From cdef530597af75ea2d1b951f8475d7bc4dea04c2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 22 Nov 2021 21:09:24 +0100 Subject: [PATCH] - PlayerPushSect --- source/games/exhumed/src/player.cpp | 10 +++++----- source/games/exhumed/src/player.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index 8bc1f595f..e916e27bc 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -1046,7 +1046,7 @@ void AIPlayer::Tick(RunListEvent* ev) if (nDiff <= 256) { - PlayerList[nPlayer].nPlayerPushSect = sectnum; + PlayerList[nPlayer].pPlayerPushSect = sect; int xvel = sPlayerInput[nPlayer].xVel; int yvel = sPlayerInput[nPlayer].yVel; @@ -1058,7 +1058,7 @@ void AIPlayer::Tick(RunListEvent* ev) if (PlayerList[nPlayer].nPlayerPushSound <= -1) { PlayerList[nPlayer].nPlayerPushSound = 1; - int nBlock = sector[PlayerList[nPlayer].nPlayerPushSect].extra; + int nBlock = PlayerList[nPlayer].pPlayerPushSect->extra; auto pBlockActor = sBlockInfo[nBlock].pActor; D3PlayFX(StaticSound[kSound23], pBlockActor, 0x4000); @@ -1083,9 +1083,9 @@ void AIPlayer::Tick(RunListEvent* ev) // loc_1AB46: if (PlayerList[nPlayer].nPlayerPushSound > -1) { - if (PlayerList[nPlayer].nPlayerPushSect > -1) + if (PlayerList[nPlayer].pPlayerPushSect != nullptr) { - StopActorSound(sBlockInfo[sector[PlayerList[nPlayer].nPlayerPushSect].extra].pActor); + StopActorSound(sBlockInfo[PlayerList[nPlayer].pPlayerPushSect->extra].pActor); } PlayerList[nPlayer].nPlayerPushSound = -1; @@ -2656,7 +2656,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, Player& w, Player* ("torch", w.nTorch) ("breathtimer", w.nBreathTimer) ("playerswear", w.nPlayerSwear) - ("pushsect", w.nPlayerPushSect) + ("pushsect", w.pPlayerPushSect) ("deathtype", w.nDeathType) ("score", w.nPlayerScore) ("color", w.nPlayerColor) diff --git a/source/games/exhumed/src/player.h b/source/games/exhumed/src/player.h index 5f9867e2d..f1f13c684 100644 --- a/source/games/exhumed/src/player.h +++ b/source/games/exhumed/src/player.h @@ -89,10 +89,10 @@ struct Player PlayerHorizon horizon; PlayerAngle angle; + sectortype* pPlayerPushSect; int16_t nBreathTimer; int16_t nPlayerSwear; - int nPlayerPushSect; int16_t nDeathType; int16_t nPlayerScore; int16_t nPlayerColor;