Skip to content

Commit

Permalink
Fix crash that can occur if CreateUnit spawns a jumpjet unit in air
Browse files Browse the repository at this point in the history
  • Loading branch information
Starkku committed Aug 15, 2024
1 parent 34491c5 commit fb19f53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Ext/Anim/Hooks.AnimCreateUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ DEFINE_HOOK(0x424932, AnimClass_AI_CreateUnit_ActualAffects, 0x6)
pJJLoco->IsMoving = true;
pJJLoco->DestinationCoords = location;
pJJLoco->CurrentHeight = pType->JumpjetHeight;
AircraftTrackerClass::Instance->Add(pTechno);

if (!inAir)
AircraftTrackerClass::Instance->Add(pTechno);
}
else if (inAir)
{
Expand Down

0 comments on commit fb19f53

Please sign in to comment.