aboutsummaryrefslogtreecommitdiff
path: root/src/game/ConfusedMovementGenerator.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-29 00:31:03 -0500
committermegamage <none@none>2009-04-29 00:31:03 -0500
commit295b634ca691ff87e8451593e277211fcb02c929 (patch)
tree75fa8ebd556019305b031531e2fa9b3937e79553 /src/game/ConfusedMovementGenerator.cpp
parentde11b9e901d1d1caa0634fad541f08f11c5781af (diff)
[7731] Some code cleanups, warrning fixes. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/ConfusedMovementGenerator.cpp')
-rw-r--r--src/game/ConfusedMovementGenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/ConfusedMovementGenerator.cpp b/src/game/ConfusedMovementGenerator.cpp
index 06871ecdfa4..bbb0b9ebc6a 100644
--- a/src/game/ConfusedMovementGenerator.cpp
+++ b/src/game/ConfusedMovementGenerator.cpp
@@ -56,11 +56,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;
}