From 9dd4a77fc4ba58af176659f096abadcec6cff99f Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Sun, 29 Sep 2024 13:29:09 +0100 Subject: [PATCH] lara_cheat: fix rotation when teleporting off a vehicle Resolves #275. --- CHANGELOG.md | 1 + src/game/lara/cheat.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b97eeea6..c957bc2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - added `/sfx` command - fixed crash in the `/set` console command (regression from 0.3) - fixed using console in cutscenes immediately exiting the game (regression from 0.3) +- fixed Lara remaining tilted when teleporting off a vehicle while on a slope (#275, regression from 0.3) ## [0.3](https://github.com/LostArtefacts/TR2X/compare/0.2-460-g4721b93...0.3) - 2024-09-20 - added new console commands: diff --git a/src/game/lara/cheat.c b/src/game/lara/cheat.c index b041bae7..68511ac8 100644 --- a/src/game/lara/cheat.c +++ b/src/game/lara/cheat.c @@ -374,7 +374,11 @@ bool Lara_Cheat_Teleport(int32_t x, int32_t y, int32_t z) g_Lara.gun_status = LGS_ARMLESS; } - Lara_GetOffVehicle(); + if (g_Lara.skidoo != NO_ITEM) { + Lara_GetOffVehicle(); + g_LaraItem->rot.x = 0; + g_LaraItem->rot.z = 0; + } if (g_Lara.extra_anim) { const ROOM *const room = &g_Rooms[g_LaraItem->room_num];