Skip to content

Commit

Permalink
Fix issue where units would get stuck in newly created wrecks.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcushutchings committed Mar 2, 2024
1 parent 9b536f2 commit f404009
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rts/Sim/MoveTypes/GroundMoveType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3297,7 +3297,8 @@ void CGroundMoveType::UpdatePos(const CUnit* unit, const float3& moveDir, float3
const int2 prevSquare = toMapSquare(prevPos);
const int2 newSquare = toMapSquare(newPos);
const int newPosStartSquare = toSquareId(newSquare);
if (toSquareId(prevSquare) == newPosStartSquare) { return; }
// this will break stuck protection because it assumes the square is open
// if (toSquareId(prevSquare) == newPosStartSquare) { return; }

bool isSquareBlocked = !isSquareOpen(newPos);
if (!isSquareBlocked) {
Expand Down

0 comments on commit f404009

Please sign in to comment.