Skip to content

Commit

Permalink
fix issue where units can get stuck in water.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcushutchings committed Jan 1, 2024
1 parent adc61a2 commit c2faff3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/Sim/MoveTypes/MoveMath/GroundMoveMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ float CMoveMath::GroundSpeedMod(const MoveDef& moveDef, float height, float slop
if (slope > moveDef.maxSlope)
return speedMod;

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

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

0 comments on commit c2faff3

Please sign in to comment.