From 44e9a66319b04793446f6c7ec52d3a2cfe7ef1b4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 2 Jan 2023 20:03:02 +0100 Subject: [PATCH] - handle 3 more of Exhumed's picnums that were quick to refactor --- source/games/exhumed/src/player.cpp | 4 ++-- source/games/exhumed/src/rat.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index d77a0e2ef..629f18c98 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -815,7 +815,7 @@ static void doPickupHealth(Player* pPlayer, DExhumedActor* pPickupActor, int nIt if (nItem == 12) { pPickupActor->spr.hitag = 0; - pPickupActor->spr.picnum++; + pPickupActor->spr.setspritetexture(pPickupActor->spr.spritetexture() + 1); ChangeActorStat(pPickupActor, 0); } else @@ -2051,7 +2051,7 @@ void AIPlayer::Tick(RunListEvent* ev) const auto pPlayerActor = pPlayer->pActor; pPlayerActor->spr.setspritetexture(getSequence(pPlayerActor->nSeqFile, PlayerSeq[nHeightTemplate[pPlayerActor->nAction]].nSeqId)->getFirstFrameTexture()); - pPlayer->pDoppleSprite->spr.picnum = pPlayerActor->spr.picnum; + pPlayer->pDoppleSprite->spr.setspritetexture(pPlayerActor->spr.spritetexture()); doPlayerCounters(pPlayer); doPlayerGravity(pPlayerActor); diff --git a/source/games/exhumed/src/rat.cpp b/source/games/exhumed/src/rat.cpp index 4e673515d..f31ca3024 100644 --- a/source/games/exhumed/src/rat.cpp +++ b/source/games/exhumed/src/rat.cpp @@ -149,7 +149,7 @@ DExhumedActor* FindFood(DExhumedActor* pActor) DExhumedActor* pActor2 = nBodySprite[RandomSize(7) % nBodyTotal]; if (pActor2 != nullptr) { - if (legacyTileNum(nPlayerPic) == pActor2->spr.picnum) + if (nPlayerPic == pActor2->spr.spritetexture()) { if (cansee(pActor->spr.pos, pSector, pActor2->spr.pos, pActor2->sector())) { return pActor2;