diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index de2378ff6..abafb6f97 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -72,7 +72,6 @@ int obobangle = 0, bobangle = 0; int nLocalPlayer = 0; Player PlayerList[kMaxPlayers]; TObjPtr nNetStartSprite[kMaxPlayers] = { }; -double nStandHeight; int PlayerCount; int nNetStartSprites; int nCurStartSprite; @@ -308,6 +307,7 @@ void RestartPlayer(int nPlayer) pPlayer->nDeathType = 0; pPlayer->nQuake = 0; pPlayer->nTemperature = 0; + pPlayer->nStandHeight = GetActorHeight(pPlayerActor); SetTorch(nPlayer, 0); if (nNetPlayerCount) @@ -1810,7 +1810,7 @@ static void updatePlayerAction(Player* const pPlayer) { nextAction = 10 - (pPlayer->totalvel <= 1); } - else if (GetActorHeight(pPlayerActor) > (pPlayerSect->floorz - pPlayerSect->ceilingz)) + else if (pPlayer->nStandHeight > (pPlayerSect->floorz - pPlayerSect->ceilingz)) { // CHECKME - confirm branching in this area is OK // CHECKME - are we finished with 'nSector' variable at this point? if so, maybe set it to pPlayerActor->sector() so we can make this code a bit neater. Don't assume pPlayerActor->sector() == nSector here!! diff --git a/source/games/exhumed/src/player.h b/source/games/exhumed/src/player.h index fbca9b38b..069a35654 100644 --- a/source/games/exhumed/src/player.h +++ b/source/games/exhumed/src/player.h @@ -101,6 +101,7 @@ struct Player double nQuake; uint8_t nPlayer; int16_t nTemperature; + double nStandHeight; PlayerSave sPlayerSave; int ototalvel; int totalvel;