Skip to content

Commit

Permalink
fix Lara drawing guns when loading OG saves (closes #36)
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Feb 28, 2021
1 parent 00e3af2 commit 2f547c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/game/laramisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,7 @@ void InitialiseLaraInventory(int32_t level_num)

Lara.gun_status = start->gun_status;
Lara.gun_type = start->gun_type;
#ifdef T1M_FEAT_INPUT
Lara.request_gun_type = LGT_UNARMED;
#else
Lara.request_gun_type = start->gun_type;
#endif

LaraInitialiseMeshes(level_num);
InitialiseNewWeapon();
Expand Down
7 changes: 7 additions & 0 deletions src/game/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ int32_t InitialiseLevel(int level_num)
ExtractSaveGameInfo();
}

#ifdef T1M_FEAT_INPUT
// LaraGun() expects request_gun_type to be set only when it really is
// needed (see https://github.com/rr-/Tomb1Main/issues/36), not at all
// times.
Lara.request_gun_type = LGT_UNARMED;
#endif

if (LevelMusic[CurrentLevel]) {
S_CDPlay(LevelMusic[CurrentLevel]);
}
Expand Down

0 comments on commit 2f547c1

Please sign in to comment.