Merc arrival location fix (#263)

* User center insertion point for merc arrival

instead of initial arrival gridno that is meant only for the very first helidrop arrival at the start of a game.

* Prevent possible nullptr dereference
This commit is contained in:
Asdow
2024-01-24 00:35:39 +02:00
committed by GitHub
parent 57bf3d9fa7
commit c7bd75b60d
4 changed files with 46 additions and 38 deletions
+7
View File
@@ -628,7 +628,14 @@ UINT32 MainGameScreenHandle(void)
InternalLocateGridNo( gGameUBOptions.LOCATEGRIDNO, TRUE );
}
#else
if (gfFirstHeliRun)
{
InternalLocateGridNo( gGameExternalOptions.iInitialMercArrivalLocation, TRUE );
}
else
{
InternalLocateGridNo(gMapInformation.sCenterGridNo, TRUE);
}
#endif
// Flugente: we might have reloaded the game, so we are currently not dropping mercs out of a helicopter
gfIngagedInDrop = FALSE;