From 295b634ca691ff87e8451593e277211fcb02c929 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 29 Apr 2009 00:31:03 -0500 Subject: [7731] Some code cleanups, warrning fixes. Author: VladimirMangos --HG-- branch : trunk --- src/game/ConfusedMovementGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/ConfusedMovementGenerator.cpp') 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::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; } -- cgit v1.2.3