From 6df854d6127c88170d0bd7bf1d204eab7db0bd7f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 26 Dec 2021 00:40:25 +0100 Subject: [PATCH] - replaced one sprite inline with its actor variant. --- source/games/sw/src/actor.cpp | 2 +- source/games/sw/src/game.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 9ff603602..68257f91d 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -331,7 +331,7 @@ int DoActorSectorDamage(DSWActor* actor) } } } - else if (GetSpriteZOfBottom(&actor->spr) >= sectp->floorz) + else if (ActorZOfBottom(actor) >= sectp->floorz) { if ((actor->user.DamageTics -= synctics) < 0) { diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index ffa093194..2d6706acf 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1709,7 +1709,7 @@ void SetOwner(int a, int b); // we still need this... void ClearOwner(DSWActor* ownr); DSWActor* GetOwner(DSWActor* child); void SetAttach(DSWActor*, DSWActor*); -void analyzesprites(spritetype* tsprite, int& spritesortcnt, int viewx, int viewy, int viewz, int camang); +void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int viewy, int viewz, int camang); void CollectPortals(); int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, int hit_y, int hit_z); @@ -2100,12 +2100,12 @@ inline int ActorSizeZ(DSWActor* actor) inline int ActorUpperZ(DSWActor* actor) { - return (GetSpriteZOfTop(&actor->spr) + (GetSpriteSizeZ(&actor->spr) >> 2)); + return (ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2)); } inline int ActorLowerZ(DSWActor* actor) { - return (GetSpriteZOfBottom(&actor->spr) - (GetSpriteSizeZ(&actor->spr) >> 2)); + return (ActorZOfBottom(actor) - (ActorSizeZ(actor) >> 2)); } // Z size of top (TOS) and bottom (BOS) part of sprite