From 2e7513d50ff9e733cfa69694eb98812768ab81cb Mon Sep 17 00:00:00 2001 From: Marcus Hutchings Date: Fri, 13 Oct 2023 19:15:47 +0100 Subject: [PATCH] prevent units pushing into structures. --- rts/Sim/MoveTypes/GroundMoveType.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rts/Sim/MoveTypes/GroundMoveType.cpp b/rts/Sim/MoveTypes/GroundMoveType.cpp index 227c68d2ff..c738287734 100644 --- a/rts/Sim/MoveTypes/GroundMoveType.cpp +++ b/rts/Sim/MoveTypes/GroundMoveType.cpp @@ -3006,15 +3006,15 @@ void CGroundMoveType::UpdateOwnerPos(const float3& oldSpeedVector, const float3& // relies on assumption that PFS will not search if start-sqr // is blocked, so too fragile // - if (!pathController.IgnoreTerrain(*owner->moveDef, owner->pos) && !owner->moveDef->TestMoveSquare(owner, owner->pos, owner->speed, true, false, true)) { + if (!pathController.IgnoreTerrain(*owner->moveDef, owner->pos) && !owner->moveDef->TestMoveSquare(owner, owner->pos, owner->speed, true, true, true)) { bool updatePos = false; for (unsigned int n = 1; n <= SQUARE_SIZE; n++) { - if (!updatePos && (updatePos = owner->moveDef->TestMoveSquare(owner, owner->pos + owner->rightdir * n, owner->speed, true, false, true))) { + if (!updatePos && (updatePos = owner->moveDef->TestMoveSquare(owner, owner->pos + owner->rightdir * n, owner->speed, true, true, true))) { owner->Move(owner->pos + owner->rightdir * n, false); break; } - if (!updatePos && (updatePos = owner->moveDef->TestMoveSquare(owner, owner->pos - owner->rightdir * n, owner->speed, true, false, true))) { + if (!updatePos && (updatePos = owner->moveDef->TestMoveSquare(owner, owner->pos - owner->rightdir * n, owner->speed, true, true, true))) { owner->Move(owner->pos - owner->rightdir * n, false); break; }