one crash fix tm

This commit is contained in:
LightCat 2018-08-25 13:22:31 +02:00
parent 766eefec29
commit afe840e2c3
2 changed files with 3 additions and 2 deletions

View File

@ -224,7 +224,7 @@ struct MAP : public micropather::Graph
corners.at(3) = Vector{ CornerOf->m_nwCorner.x, CornerOf->m_seCorner.y,
CornerOf->m_seCorner.z }; // SW
Vector bestVec;
Vector bestVec{};
float bestDist = FLT_MAX;
for (size_t i = 0; i < corners.size(); i++)
@ -237,7 +237,7 @@ struct MAP : public micropather::Graph
}
}
Vector bestVec2;
Vector bestVec2{};
float bestDist2 = FLT_MAX;
for (size_t i = 0; i < corners.size(); i++)

View File

@ -303,6 +303,7 @@ bool NavToSniperSpot(int priority)
? preferred_sniper_spots
: sniper_spots;
bool toret = false;
if (use_preferred)
{
int best_spot = -1;