From f40400917fff126e0fce2070b57b85166a45be8c Mon Sep 17 00:00:00 2001 From: Marcus Hutchings Date: Sat, 2 Mar 2024 18:12:46 +0000 Subject: [PATCH] Fix issue where units would get stuck in newly created wrecks. --- rts/Sim/MoveTypes/GroundMoveType.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rts/Sim/MoveTypes/GroundMoveType.cpp b/rts/Sim/MoveTypes/GroundMoveType.cpp index 6df192f653..7e2864a7d5 100644 --- a/rts/Sim/MoveTypes/GroundMoveType.cpp +++ b/rts/Sim/MoveTypes/GroundMoveType.cpp @@ -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) {