diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-12-31 03:26:44 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2021-01-01 04:39:17 +0100 |
| commit | f24f4cb3de5ca8b45e6dc7b82d5898eee2cce584 (patch) | |
| tree | e082650bb867f86585faea5b78c4ef273f43db68 | |
| parent | cb6dcac4ed7d993b0ab0f064ab3a73ed652b26a0 (diff) | |
Fix bug that accidentally removed aircraft in unboard state
| -rw-r--r-- | Source/Game.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Game.c b/Source/Game.c index bcc9593..d53d6f8 100644 --- a/Source/Game.c +++ b/Source/Game.c @@ -4017,9 +4017,6 @@ void GameRemoveFlight(const uint8_t idx, const bool successful) { uint8_t k; - memset(ptrPlayer->UnboardingSequence, 0, GAME_MAX_SEQUENCE_KEYS); - ptrPlayer->UnboardingSequenceIdx = 0; - for (k = 0; k < GAME_MAX_RUNWAYS; k++) { const uint16_t* const targets = AircraftGetTargets(idx); @@ -4047,6 +4044,8 @@ void GameRemoveFlight(const uint8_t idx, const bool successful) { if (FlightData.State[idx] == STATE_UNBOARDING) { + memset(ptrPlayer->UnboardingSequence, 0, GAME_MAX_SEQUENCE_KEYS); + ptrPlayer->UnboardingSequenceIdx = 0; ptrPlayer->Unboarding = false; ptrPlayer->LockTarget = false; ptrPlayer->LockedAircraft = FLIGHT_DATA_INVALID_IDX; |
