[7731] Some code cleanups, warrning fixes.

This commit is contained in:
VladimirMangos 2009-04-29 03:44:57 +04:00
parent 8144f30199
commit 512c015dc2
30 changed files with 128 additions and 151 deletions

View file

@ -54,11 +54,12 @@ ConfusedMovementGenerator<T>::Initialize(T &unit)
bool is_water = map->IsInWater(i_waypoints[idx][0],i_waypoints[idx][1],z);
// if generated wrong path just ignore
if( is_water && !is_water_ok || !is_water && !is_land_ok )
if ((is_water && !is_water_ok) || (!is_water && !is_land_ok))
{
i_waypoints[idx][0] = idx > 0 ? i_waypoints[idx-1][0] : x;
i_waypoints[idx][1] = idx > 0 ? i_waypoints[idx-1][1] : y;
}
unit.UpdateGroundPositionZ(i_waypoints[idx][0],i_waypoints[idx][1],z);
i_waypoints[idx][2] = z;
}