Skip to content

Commit c2faff3

Browse files
fix issue where units can get stuck in water.
1 parent adc61a2 commit c2faff3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rts/Sim/MoveTypes/MoveMath/GroundMoveMath.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ float CMoveMath::GroundSpeedMod(const MoveDef& moveDef, float height, float slop
3939
if (slope > moveDef.maxSlope)
4040
return speedMod;
4141

42-
// is this square below our maxWaterDepth and are we going further downhill?
43-
if ((dirSlopeMod <= 0.0f) && (-height > moveDef.depth))
42+
// is this square below our maxWaterDepth?
43+
if ((-height) > moveDef.depth)
4444
return speedMod;
4545

4646
// slope-mod (speedMod is not increased or decreased by downhill slopes)

0 commit comments

Comments
 (0)