From c100ef04ce316c21c8887b21f132cbe03c4b3ce1 Mon Sep 17 00:00:00 2001 From: rr- Date: Thu, 17 Feb 2022 13:07:32 +0100 Subject: [PATCH] demo: fix equipping weapons on start Resolves #440 --- CHANGELOG.md | 2 +- src/game/demo.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36548737e..8b189bbb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## [Unreleased](https://github.com/rr-/Tomb1Main/compare/2.6.1...master) -- ... +- fixed equipping gun after starting a demo (#440, regression from 2.6) ## [2.6.1](https://github.com/rr-/Tomb1Main/compare/2.6...2.6.1) - 2022-02-16 - fixed equipping gun after starting the game (#439, regression from 2.6) diff --git a/src/game/demo.c b/src/game/demo.c index 12f617334..8f67e102f 100644 --- a/src/game/demo.c +++ b/src/game/demo.c @@ -66,6 +66,11 @@ int32_t StartDemo() Random_SeedDraw(0xD371F947); Random_SeedControl(0xD371F947); + // LaraGun() expects request_gun_type to be set only when it + // really is needed, not at all times. + // https://github.com/rr-/Tomb1Main/issues/36 + g_Lara.request_gun_type = LGT_UNARMED; + txt = Text_Create(0, -16, g_GameFlow.strings[GS_MISC_DEMO_MODE]); Text_Flash(txt, 1, 20); Text_AlignBottom(txt, 1);