Skip to content

Commit

Permalink
force struck check on moveType's first creation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcushutchings committed Oct 28, 2023
1 parent 4d27bcf commit 9e51205
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rts/Sim/MoveTypes/GroundMoveType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ CGroundMoveType::CGroundMoveType(CUnit* owner):
killUnits.reserve(UNIT_EVENTS_RESERVE);
moveFeatures.reserve(UNIT_EVENTS_RESERVE);

forceStaticObjectCheck = true;

Connect();
}

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 9e51205

Please sign in to comment.