Skip to content

Commit

Permalink
ChangeLevel: Unequip the weapon after loading saves or changing level
Browse files Browse the repository at this point in the history
We already exit combat mode - leaving the weapon equipped puts the
player character into an inconsistent state.
  • Loading branch information
dscharrer committed Jun 2, 2017
1 parent 5012166 commit 976cf4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scene/ChangeLevel.cpp
Expand Up @@ -2719,6 +2719,7 @@ static bool ARX_CHANGELEVEL_PopLevel(long instance, bool reloadflag) {
TRUE_PLAYER_MOUSELOOK_ON = true;
// disable combat mode
player.Interface &= ~INTER_COMBATMODE;
ARX_EQUIPMENT_AttachPlayerWeaponToBack();

progressBarAdvance();
LoadLevelScreen();
Expand Down Expand Up @@ -2872,6 +2873,7 @@ long ARX_CHANGELEVEL_Load(const fs::path & savefile) {

BLOCK_PLAYER_CONTROLS = false;
player.Interface &= ~INTER_COMBATMODE;
ARX_EQUIPMENT_AttachPlayerWeaponToBack();

entities.player()->animlayer[1].cur_anim = NULL;

Expand Down

0 comments on commit 976cf4b

Please sign in to comment.