lara/cheat: prevent fly cheat after exploding death
Some checks failed
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Run code linters / Run code linters (push) Has been cancelled

This prevents the fly cheat from being used after the explosion cheat.

Resolves #2584.
This commit is contained in:
lahm86 2025-03-06 10:19:17 +00:00
parent 869501db67
commit c5757957b9
4 changed files with 12 additions and 0 deletions

View file

@ -6,6 +6,7 @@
- fixed extremely large item quantities crashing the game (#2497, regression from 0.3) - fixed extremely large item quantities crashing the game (#2497, regression from 0.3)
- fixed Lara's meshes not resetting after using the fly cheat (#2565, #2572, regressions from 4.8) - fixed Lara's meshes not resetting after using the fly cheat (#2565, #2572, regressions from 4.8)
- fixed guns appearing in Lara's hands if the draw input is held when unarmed and while picking up a gun item (#2577, regressions from 0.8/4.3) - fixed guns appearing in Lara's hands if the draw input is held when unarmed and while picking up a gun item (#2577, regressions from 0.8/4.3)
- fixed being able to play with Lara invisible after using the explosion cheat then the fly cheat (#2584, regression from 4.8)
## [4.8.3](https://github.com/LostArtefacts/TRX/compare/tr1-4.8.2...tr1-4.8.3) - 2025-02-17 ## [4.8.3](https://github.com/LostArtefacts/TRX/compare/tr1-4.8.2...tr1-4.8.3) - 2025-02-17
- fixed some of Lara's speech in the gym not playing in response to player action (#2514, regression from 4.8) - fixed some of Lara's speech in the gym not playing in response to player action (#2514, regression from 4.8)

View file

@ -12,6 +12,7 @@
- fixed the play any level dialog not showing in the gym passport (#2564, regression from 0.9) - fixed the play any level dialog not showing in the gym passport (#2564, regression from 0.9)
- fixed losing the NG+ flag when loading a save that has it set (#2566, regression from 0.9.2) - fixed losing the NG+ flag when loading a save that has it set (#2566, regression from 0.9.2)
- fixed the ammo counter not showing in demos if NG+ is set (#2574, regression from 0.9) - fixed the ammo counter not showing in demos if NG+ is set (#2574, regression from 0.9)
- fixed being able to play with Lara invisible after using the explosion cheat then the fly cheat (#2584, regression from 0.9)
## [0.9.2](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.1...tr2-0.9.2) - 2025-02-19 ## [0.9.2](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.1...tr2-0.9.2) - 2025-02-19
- fixed secret rewards not handed out after loading a save (#2528, regression from 0.8) - fixed secret rewards not handed out after loading a save (#2528, regression from 0.8)

View file

@ -139,6 +139,11 @@ bool Lara_Cheat_EnterFlyMode(void)
return false; return false;
} }
if ((g_LaraItem->flags & IF_INVISIBLE) != 0) {
// The explosion cheat has been used, so Lara's death is permanent.
return false;
}
g_Lara.request_gun_type = LGT_UNARMED; g_Lara.request_gun_type = LGT_UNARMED;
if (g_LaraItem->hit_points <= 0) { if (g_LaraItem->hit_points <= 0) {
g_Lara.gun_status = LGS_ARMLESS; g_Lara.gun_status = LGS_ARMLESS;

View file

@ -120,6 +120,11 @@ bool Lara_Cheat_EnterFlyMode(void)
return false; return false;
} }
if ((g_LaraItem->flags & IF_INVISIBLE) != 0) {
// The explosion cheat has been used, so Lara's death is permanent.
return false;
}
if (g_Lara.extra_anim) { if (g_Lara.extra_anim) {
M_ResetGunStatus(); M_ResetGunStatus();
} }