From 9e512052474f6ad86dda752727cff832d2635cc9 Mon Sep 17 00:00:00 2001 From: Marcus Hutchings Date: Sat, 28 Oct 2023 12:18:08 +0100 Subject: [PATCH] force struck check on moveType's first creation --- rts/Sim/MoveTypes/GroundMoveType.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rts/Sim/MoveTypes/GroundMoveType.cpp b/rts/Sim/MoveTypes/GroundMoveType.cpp index beb1c62fe5..1248d47061 100644 --- a/rts/Sim/MoveTypes/GroundMoveType.cpp +++ b/rts/Sim/MoveTypes/GroundMoveType.cpp @@ -498,6 +498,8 @@ CGroundMoveType::CGroundMoveType(CUnit* owner): killUnits.reserve(UNIT_EVENTS_RESERVE); moveFeatures.reserve(UNIT_EVENTS_RESERVE); + forceStaticObjectCheck = true; + Connect(); } @@ -2206,7 +2208,8 @@ void CGroundMoveType::StartEngine(bool callScript) { // Due to how push resistant units work, they can trap units when they stop moving. // Have units check they are not trapped when beginning to move is any push resistant units // are used by the game. - forceStaticObjectCheck = (unitDefHandler->NumPushResistantUnitDefs() > 0); + if (!forceStaticObjectCheck) + forceStaticObjectCheck = (unitDefHandler->NumPushResistantUnitDefs() > 0); } }