diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 65cf762a4..195dc35da 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -2576,15 +2576,15 @@ void handle_se00(DDukeActor* actor) if (actor->spr.extra == 1) { - if (actor->tempang < 256) + if (actor->tempval < 256) { - actor->tempang += 4; - if (actor->tempang >= 256) + actor->tempval += 4; + if (actor->tempval >= 256) callsound(actor->sector(), actor, true); if (actor->native_clipdist()) direction = 1; // notreallyclipdist else direction = -1; } - else actor->tempang = 256; + else actor->tempval = 256; if (sect->floorz > actor->spr.pos.Z) //z's are touching { @@ -2604,15 +2604,15 @@ void handle_se00(DDukeActor* actor) } else if (actor->spr.extra == 3) { - if (actor->tempang > 0) + if (actor->tempval > 0) { - actor->tempang -= 4; - if (actor->tempang <= 0) + actor->tempval -= 4; + if (actor->tempval <= 0) callsound(actor->sector(), actor, true); if (actor->native_clipdist()) direction = -1; // notreallyclipdist else direction = 1; } - else actor->tempang = 0; + else actor->tempval = 0; double checkz = actor->temp_pos.Z; if (sect->floorz > checkz) //z's are touching diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index b8cf03b66..81d77b329 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -1283,8 +1283,8 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, else SetGameVarID(lVar2, act->movflag, sActor, sPlayer); break; case ACTOR_HTTEMPANG: - if (bSet) act->tempang = lValue; - else SetGameVarID(lVar2, act->tempang, sActor, sPlayer); + if (bSet) act->tempval = lValue; + else SetGameVarID(lVar2, act->tempval, sActor, sPlayer); break; case ACTOR_HTACTORSTAYPUT: if (bSet) act->actorstayput = toSect(lValue); @@ -1693,9 +1693,9 @@ int ParseState::parse(void) ps[connecthead].max_actors_killed++; //revive the egg g_ac->temp_data[5] = 0; } - g_ac->spr.pal = (uint8_t)g_ac->tempang; + g_ac->spr.pal = (uint8_t)g_ac->tempval; } - g_ac->tempang = 0; + g_ac->tempval = 0; break; case concmd_tossweapon: insptr++; @@ -2265,7 +2265,7 @@ int ParseState::parse(void) g_ac->cgg = 0; g_ac->movflag = 0; - g_ac->tempang = 0; + g_ac->tempval = 0; g_ac->actorstayput = nullptr; g_ac->dispicnum = 0; g_ac->SetHitOwner(ps[g_p].GetActor()); @@ -2512,7 +2512,7 @@ int ParseState::parse(void) case concmd_spritepal: insptr++; if(!g_ac->isPlayer()) - g_ac->tempang = g_ac->spr.pal; + g_ac->tempval = g_ac->spr.pal; g_ac->spr.pal = *insptr; insptr++; break; diff --git a/source/games/duke/src/savegame.cpp b/source/games/duke/src/savegame.cpp index ef02587d6..feb677a22 100644 --- a/source/games/duke/src/savegame.cpp +++ b/source/games/duke/src/savegame.cpp @@ -284,7 +284,7 @@ void DDukeActor::Serialize(FSerializer& arc) ("owneractor", ownerActor) ("owner", hitOwnerActor) ("movflag", movflag) - ("tempang", tempang) + ("tempang", tempval) ("actorstayput", actorstayput) ("dispicnum", dispicnum) ("basepicnum", basepicnum) diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index 95400faad..dee058490 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -1010,7 +1010,7 @@ void operatesectors(sectortype* sptr, DDukeActor *actor) { auto act = barrier_cast(sptr->hitagactor); if (!act) break; - if (act->tempang == 0 || act->tempang == 256) callsound(sptr, actor); + if (act->tempval == 0 || act->tempval == 256) callsound(sptr, actor); if (act->spr.extra == 1) act->spr.extra = 3; else act->spr.extra = 1; break; diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index dcd553374..36186427c 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -88,7 +88,7 @@ DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, int s_pn, in act->hitextra = -1; act->cgg = 0; act->movflag = 0; - act->tempang = 0; + act->tempval = 0; act->dispicnum = 0; act->SetHitOwner(s_ow); act->SetOwner(s_ow); @@ -148,7 +148,7 @@ bool initspriteforspawn(DDukeActor* act) act->SetHitOwner(act); act->cgg = 0; act->movflag = 0; - act->tempang = 0; + act->tempval = 0; act->dispicnum = 0; act->floorz = act->sector()->floorz; act->ceilingz = act->sector()->ceilingz; @@ -272,7 +272,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act) if (actj) { if (actj->spr.picnum == RESPAWN) - act->tempang = act->spr.pal = actj->spr.pal; + act->tempval = act->spr.pal = actj->spr.pal; ChangeActorStat(act, STAT_ACTOR); } else ChangeActorStat(act, STAT_ZOMBIEACTOR); diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index cd7e32541..25b401af4 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -42,7 +42,7 @@ public: uint8_t cgg; uint8_t spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'. short attackertype, hitextra, movflag; - short tempang, dispicnum, basepicnum; + short tempval, dispicnum, basepicnum; short timetosleep; DVector2 ovel; DAngle hitang; diff --git a/source/games/duke/src/vmexports.cpp b/source/games/duke/src/vmexports.cpp index 3ba4f0bdb..3ac9ad29e 100644 --- a/source/games/duke/src/vmexports.cpp +++ b/source/games/duke/src/vmexports.cpp @@ -98,7 +98,7 @@ DEFINE_FIELD(DDukeActor, spriteextra) DEFINE_FIELD(DDukeActor, hitang) DEFINE_FIELD(DDukeActor, hitextra) DEFINE_FIELD(DDukeActor, movflag) -DEFINE_FIELD(DDukeActor, tempang) +DEFINE_FIELD(DDukeActor, tempval) DEFINE_FIELD(DDukeActor, timetosleep) DEFINE_FIELD(DDukeActor, floorz) DEFINE_FIELD(DDukeActor, ceilingz) diff --git a/wadsrc/static/zscript/games/duke/dukeactor.zs b/wadsrc/static/zscript/games/duke/dukeactor.zs index 5d849bff0..be1f9dc8f 100644 --- a/wadsrc/static/zscript/games/duke/dukeactor.zs +++ b/wadsrc/static/zscript/games/duke/dukeactor.zs @@ -29,7 +29,7 @@ class DukeActor : CoreActor native native uint8 cgg; native uint8 spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'. native int16 /*attackertype, hitang,*/ hitextra, movflag; - native int16 tempang; /*, dispicnum;*/ + native int16 tempval; /*, dispicnum;*/ native int16 timetosleep; native double floorz, ceilingz; native int saved_ammo;