From 81fc066a5e0f717e501fc59364772dfd177c11bc Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 1 Sep 2022 00:00:36 +0200 Subject: [PATCH] - use zvel's alias inittype where it's not being used for velocity. --- source/core/maploader.cpp | 6 +++--- source/games/sw/src/game.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/core/maploader.cpp b/source/core/maploader.cpp index ba298a056..d495bbde2 100644 --- a/source/core/maploader.cpp +++ b/source/core/maploader.cpp @@ -318,7 +318,7 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno) spr.intowner = fr.ReadInt16(); spr.xvel = fr.ReadInt16(); spr.yvel = fr.ReadInt16(); - spr.zvel = fr.ReadInt16(); + spr.inittype = fr.ReadInt16(); spr.lotag = fr.ReadInt16(); spr.hitag = fr.ReadInt16(); spr.extra = fr.ReadInt16(); @@ -344,7 +344,7 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr, int& secno) spr.angle = DAngle::fromBuild(spr.intangle); spr.xvel = fr.ReadInt16(); spr.yvel = fr.ReadInt16(); - spr.zvel = fr.ReadInt16(); + spr.inittype = fr.ReadInt16(); spr.intowner = fr.ReadInt16(); secno = fr.ReadInt16(); spr.statnum = fr.ReadInt16(); @@ -372,7 +372,7 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr, int& secno) spr.angle = DAngle::fromBuild(spr.intangle); spr.xvel = fr.ReadInt16(); spr.yvel = fr.ReadInt16(); - spr.zvel = fr.ReadInt16(); + spr.inittype = fr.ReadInt16(); spr.intowner = fr.ReadInt16(); secno = fr.ReadInt16(); spr.statnum = fr.ReadInt16(); diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 558bac9ed..ccc834ec8 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -2116,8 +2116,8 @@ inline uint8_t& SP_TAG3(DSWActor* actor) { return actor->spr.clipdist; } inline int16_t& SP_TAG4(DSWActor* actor) { return actor->spr.intangle; } // this may not be transitioned to a real angular type inline int16_t& SP_TAG5(DSWActor* actor) { return actor->spr.xvel; } inline int16_t& SP_TAG6(DSWActor* actor) { return actor->spr.yvel; } -inline uint8_t& SP_TAG7(DSWActor* actor) { return MSB_VAR(actor->spr.zvel); } -inline uint8_t& SP_TAG8(DSWActor* actor) { return LSB_VAR(actor->spr.zvel); } +inline uint8_t& SP_TAG7(DSWActor* actor) { return MSB_VAR(actor->spr.inittype); } +inline uint8_t& SP_TAG8(DSWActor* actor) { return LSB_VAR(actor->spr.inittype); } inline uint8_t& SP_TAG9(DSWActor* actor) { return MSB_VAR(actor->spr.intowner); } inline uint8_t& SP_TAG10(DSWActor* actor) { return LSB_VAR(actor->spr.intowner); } inline int8_t& SP_TAG11(DSWActor* actor) { return actor->spr.shade; }