From c10fb1278ae025adb54e2d6ead02c288c64f1043 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 30 Dec 2021 17:10:08 +0100 Subject: [PATCH] - moved the backup... methods to DCoreActor. --- source/core/coreactor.h | 36 ++++++++++++++++++++++++++++ source/core/maptypes.h | 36 ---------------------------- source/games/blood/src/view.h | 2 +- source/games/duke/src/actors.cpp | 14 +++++------ source/games/duke/src/actors_d.cpp | 10 ++++---- source/games/duke/src/actors_r.cpp | 14 +++++------ source/games/duke/src/gameexec.cpp | 2 +- source/games/duke/src/premap.cpp | 2 +- source/games/duke/src/sectors.cpp | 2 +- source/games/duke/src/spawn.cpp | 4 ++-- source/games/exhumed/src/anims.cpp | 2 +- source/games/exhumed/src/bubbles.cpp | 2 +- source/games/exhumed/src/bullet.cpp | 2 +- source/games/exhumed/src/exhumed.cpp | 2 +- source/games/exhumed/src/grenade.cpp | 2 +- source/games/exhumed/src/object.cpp | 10 ++++---- source/games/exhumed/src/queen.cpp | 2 +- source/games/exhumed/src/snake.cpp | 2 +- source/games/sw/src/actor.cpp | 12 +++++----- source/games/sw/src/coolie.cpp | 2 +- source/games/sw/src/player.cpp | 12 +++++----- source/games/sw/src/sprite.cpp | 6 ++--- source/games/sw/src/track.cpp | 2 +- source/games/sw/src/weapon.cpp | 26 ++++++++++---------- 24 files changed, 103 insertions(+), 103 deletions(-) diff --git a/source/core/coreactor.h b/source/core/coreactor.h index 16fdb2bb9..2656e2f3a 100644 --- a/source/core/coreactor.h +++ b/source/core/coreactor.h @@ -42,6 +42,42 @@ public: return spr.time; } + void backupx() + { + spr.opos.X = spr.pos.X; + } + + void backupy() + { + spr.opos.Y = spr.pos.Y; + } + + void backupz() + { + spr.opos.Z = spr.pos.Z; + } + + void backupvec2() + { + spr.opos.vec2 = spr.pos.vec2; + } + + void backuppos() + { + spr.opos = spr.pos; + } + + void backupang() + { + spr.oang = spr.ang; + } + + void backuploc() + { + backuppos(); + backupang(); + } + sectortype* sector() const { return spr.sectp; diff --git a/source/core/maptypes.h b/source/core/maptypes.h index a9664c4a1..1ce0b6b71 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -490,42 +490,6 @@ struct spritetypebase { return interpolatedangle(oang, ang, smoothratio, 16); } - - void backupx() - { - opos.X = pos.X; - } - - void backupy() - { - opos.Y = pos.Y; - } - - void backupz() - { - opos.Z = pos.Z; - } - - void backupvec2() - { - opos.vec2 = pos.vec2; - } - - void backuppos() - { - opos = pos; - } - - void backupang() - { - oang = ang; - } - - void backuploc() - { - backuppos(); - backupang(); - } }; diff --git a/source/games/blood/src/view.h b/source/games/blood/src/view.h index ee7a2d90d..80df07a66 100644 --- a/source/games/blood/src/view.h +++ b/source/games/blood/src/view.h @@ -175,7 +175,7 @@ inline void viewBackupSpriteLoc(DBloodActor* actor) { if (!actor->interpolated) { - actor->spr.backuploc(); + actor->backuploc(); actor->interpolated = true; } } diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index dded610f0..fe2bda716 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -404,7 +404,7 @@ void moveplayers(void) act->spr.pos.X = p->opos.X; act->spr.pos.Y = p->opos.Y; act->spr.pos.Z = p->opos.Z + gs.playerheight; - act->spr.backupz(); + act->backupz(); act->spr.ang = p->angle.oang.asbuild(); SetActor(act, act->spr.pos); } @@ -1052,7 +1052,7 @@ void movewaterdrip(DDukeActor *actor, int drip) else { actor->spr.pos.Z = actor->temp_data[0]; - actor->spr.backupz(); + actor->backupz(); actor->temp_data[1] = 48 + (krand() & 31); } } @@ -2903,7 +2903,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6) if (numplayers > 1) { - a2->spr.backupvec2(); + a2->backupvec2(); } } } @@ -3067,7 +3067,7 @@ void handle_se30(DDukeActor *actor, int JIBS6) if (numplayers > 1) { - a2->spr.backupvec2(); + a2->backupvec2(); } } } @@ -3847,7 +3847,7 @@ void handle_se17(DDukeActor* actor) } if (act1->spr.statnum != STAT_EFFECTOR) { - act1->spr.backupz(); + act1->backupz(); act1->spr.pos.Z += q; } @@ -3915,7 +3915,7 @@ void handle_se17(DDukeActor* actor) act3->spr.pos.Y += act2->spr.pos.Y - actor->spr.pos.Y; act3->spr.pos.Z = act2->sector()->floorz - (sc->floorz - act3->spr.pos.Z); - act3->spr.backupz(); + act3->backupz(); ChangeActorSect(act3, act2->sector()); SetActor(act3, act3->spr.pos); @@ -5201,7 +5201,7 @@ void recordoldspritepos() DukeStatIterator it(statNum); while (auto ac = it.Next()) { - ac->spr.backuploc(); + ac->backuploc(); } } } diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 02ced0997..8a41a9383 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -2126,7 +2126,7 @@ void movetransports_d(void) act2->spr.pos.Z -= act->spr.pos.Z - Owner->sector()->floorz; act2->spr.ang = Owner->spr.ang; - act2->spr.backupang(); + act2->backupang(); if (act->spr.pal == 0) { @@ -2152,7 +2152,7 @@ void movetransports_d(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->spr.pos.Z + 4096; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); } @@ -2162,7 +2162,7 @@ void movetransports_d(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->ceilingz + ll; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); @@ -2172,7 +2172,7 @@ void movetransports_d(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->floorz - ll; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); @@ -3709,7 +3709,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel) { if ((badguy(actor) && actor->spr.extra <= 0) || (actor->spr.opos.X != actor->spr.pos.X) || (actor->spr.opos.Y != actor->spr.pos.Y)) { - actor->spr.backupvec2(); + actor->backupvec2(); SetActor(actor, actor->spr.pos); } return; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index e27288509..6000fc238 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -1822,7 +1822,7 @@ void movetransports_r(void) act2->spr.pos.Z -= act->spr.pos.Z - Owner->sector()->floorz; act2->spr.ang = Owner->spr.ang; - act2->spr.backupang(); + act2->backupang(); auto beam = spawn(act, TRANSPORTERBEAM); if (beam) S_PlayActorSound(TELEPORTER, beam); @@ -1845,7 +1845,7 @@ void movetransports_r(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->spr.pos.Z + 4096; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); } @@ -1855,7 +1855,7 @@ void movetransports_r(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->ceilingz + ll; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); @@ -1865,7 +1865,7 @@ void movetransports_r(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->floorz - ll; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); @@ -1877,7 +1877,7 @@ void movetransports_r(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->ceilingz + ll2; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); @@ -1891,7 +1891,7 @@ void movetransports_r(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->floorz - ll2; - act2->spr.backupz(); + act2->backupz(); ChangeActorSect(act2, Owner->sector()); @@ -3756,7 +3756,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel) { if ((badguy(actor) && actor->spr.extra <= 0) || (actor->spr.opos.X != actor->spr.pos.X) || (actor->spr.opos.Y != actor->spr.pos.Y)) { - actor->spr.backupvec2(); + actor->backupvec2(); SetActor(actor, actor->spr.pos); } if (badguy(actor) && actor->spr.extra <= 0) diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index e94716487..d53733ecf 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -2248,7 +2248,7 @@ int ParseState::parse(void) g_ac->spr.pos.X = ps[g_p].bobpos.X = ps[g_p].opos.X = ps[g_p].pos.X; g_ac->spr.pos.Y = ps[g_p].bobpos.Y = ps[g_p].opos.Y = ps[g_p].pos.Y; g_ac->spr.pos.Z = ps[g_p].opos.Z = ps[g_p].pos.Z; - g_ac->spr.backuppos(); + g_ac->backuppos(); updatesector(ps[g_p].pos.X, ps[g_p].pos.Y, &ps[g_p].cursector); SetActor(ps[g_p].GetActor(), { ps[g_p].pos.X, ps[g_p].pos.Y, ps[g_p].pos.Z + gs.playerheight }); g_ac->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 7affb9bf4..92540ef00 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -628,7 +628,7 @@ void resetpspritevars(int g) ps[j].bobpos.X = ps[j].opos.X = ps[j].pos.X = act->spr.pos.X; ps[j].bobpos.Y = ps[j].opos.Y = ps[j].pos.Y = act->spr.pos.Y; ps[j].opos.Z = ps[j].pos.Z = act->spr.pos.Z; - act->spr.backuppos(); + act->backuppos(); ps[j].angle.oang = ps[j].angle.ang = buildang(act->spr.ang); updatesector(act->spr.pos.X, act->spr.pos.Y, &ps[j].cursector); diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index 5250ebb91..c6b6b133f 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -359,7 +359,7 @@ void doanimations(void) { if (act->spr.statnum != STAT_EFFECTOR) { - act->spr.backupz(); + act->backupz(); act->spr.pos.Z += v; act->floorz = dasectp->floorz + v; } diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index b74f4a432..9e84cc2b8 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -78,7 +78,7 @@ DDukeActor* EGS(sectortype* whatsectp, int s_x, int s_y, int s_z, int s_pn, int8 act->spr.clipdist = 0; act->spr.pal = 0; act->spr.lotag = 0; - act->spr.backuploc(); + act->backuploc(); act->ovel.X = 0; act->ovel.Y = 0; @@ -141,7 +141,7 @@ bool initspriteforspawn(DDukeActor* act, const std::initializer_list &exclu act->timetosleep = 0; act->extra = -1; - act->spr.backuppos(); + act->backuppos(); act->SetOwner(act); act->SetHitOwner(act); diff --git a/source/games/exhumed/src/anims.cpp b/source/games/exhumed/src/anims.cpp index beaed92ac..b7fbaba21 100644 --- a/source/games/exhumed/src/anims.cpp +++ b/source/games/exhumed/src/anims.cpp @@ -91,7 +91,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, int x, int y, pActor->spr.xvel = 0; pActor->spr.yvel = 0; pActor->spr.zvel = 0; - pActor->spr.backuppos(); + pActor->backuppos(); // CHECKME - where is hitag set otherwise? if (pActor->spr.statnum < 900) { diff --git a/source/games/exhumed/src/bubbles.cpp b/source/games/exhumed/src/bubbles.cpp index 461fe9061..2b2967057 100644 --- a/source/games/exhumed/src/bubbles.cpp +++ b/source/games/exhumed/src/bubbles.cpp @@ -59,7 +59,7 @@ DExhumedActor* BuildBubble(vec3_t pos, sectortype* pSector) pActor->spr.hitag = -1; pActor->spr.extra = -1; pActor->spr.lotag = runlist_HeadRun() + 1; - pActor->spr.backuppos(); + pActor->backuppos(); // GrabTimeSlot(3); diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index 3351a64ba..5ff963878 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -702,7 +702,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n pBullet->nRunRec2 = runlist_AddRunRec(NewRun, nBullet, 0xB0000); pBullet->nDoubleDamage = nDoubleDamage; pBulletActor->spr.pos.Z += nZOffset; - pBulletActor->spr.backuppos(); + pBulletActor->backuppos(); int var_18 = 0; diff --git a/source/games/exhumed/src/exhumed.cpp b/source/games/exhumed/src/exhumed.cpp index afaca6720..0ecb8d777 100644 --- a/source/games/exhumed/src/exhumed.cpp +++ b/source/games/exhumed/src/exhumed.cpp @@ -268,7 +268,7 @@ void GameMove(void) ExhumedSpriteIterator it; while (auto ac = it.Next()) { - ac->spr.backuploc(); + ac->backuploc(); } if (currentLevel->gameflags & LEVEL_EX_COUNTDOWN) diff --git a/source/games/exhumed/src/grenade.cpp b/source/games/exhumed/src/grenade.cpp index 4e384967d..2c61afa9e 100644 --- a/source/games/exhumed/src/grenade.cpp +++ b/source/games/exhumed/src/grenade.cpp @@ -124,7 +124,7 @@ void BuildGrenade(int nPlayer) pActor->spr.hitag = 0; pActor->spr.lotag = runlist_HeadRun() + 1; pActor->spr.extra = -1; - pActor->spr.backuppos(); + pActor->backuppos(); // GrabTimeSlot(3); diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index 2ae2ab964..3582b8f4d 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1024,7 +1024,7 @@ int BuildSlide(int nChannel, walltype* pStartWall, walltype* pWall1, walltype* p pActor->spr.pos.X = pStartWall->pos.X; pActor->spr.pos.Y = pStartWall->pos.Y; pActor->spr.pos.Z = pSector->floorz; - pActor->spr.backuppos(); + pActor->backuppos(); SlideData[nSlide].nRunC = 0; @@ -1253,7 +1253,7 @@ int BuildTrap(DExhumedActor* pActor, int edx, int ebx, int ecx) } } } - pActor->spr.backuppos(); + pActor->backuppos(); return nTrap; } @@ -1407,7 +1407,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal) pSpark->spr.lotag = runlist_HeadRun() + 1; pSpark->spr.clipdist = 1; pSpark->spr.hitag = 0; - pSpark->spr.backuppos(); + pSpark->backuppos(); // GrabTimeSlot(3); @@ -1602,7 +1602,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector) pActor->spr.lotag = runlist_HeadRun() + 1; pActor->spr.hitag = 0; pActor->spr.owner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x250000); - pActor->spr.backuppos(); + pActor->backuppos(); return pActor; } @@ -1847,7 +1847,7 @@ DExhumedActor* BuildObject(DExhumedActor* pActor, int nOjectType, int nHitag) pActor->nIndex2 = -nHitag; } } - pActor->spr.backuppos(); + pActor->backuppos(); return pActor; } diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index c915a7a39..15204e205 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -463,7 +463,7 @@ void BuildQueenEgg(int nQueen, int nVal) pActor2->spr.shade = -12; pActor2->spr.picnum = 1; pActor2->spr.ang = (RandomSize(9) + (nAngle - 256)) & kAngleMask; - pActor2->spr.backuppos(); + pActor2->backuppos(); if (!nVal) { diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 9333dfbd1..6a72946a0 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -223,7 +223,7 @@ void BuildSnake(int nPlayer, int zVal) pActor->spr.hitag = 0; pActor->spr.extra = -1; pActor->spr.lotag = runlist_HeadRun() + 1; - pActor->spr.backuppos(); + pActor->backuppos(); SnakeList[nSnake].pSprites[i] = pActor; diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index a50092e00..dc31ee308 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -515,7 +515,7 @@ void KeepActorOnFloor(DSWActor* actor) actor->user.Flags &= ~(SPR_SWIMMING); actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); actor->user.oz = actor->spr.pos.Z = actor->user.loz; - actor->spr.backupz(); + actor->backupz(); return; } @@ -526,7 +526,7 @@ void KeepActorOnFloor(DSWActor* actor) // are swimming actor->user.oz = actor->spr.pos.Z = actor->user.loz - Z(depth); - actor->spr.backupz(); + actor->backupz(); } else { @@ -535,7 +535,7 @@ void KeepActorOnFloor(DSWActor* actor) { NewStateGroup(actor, actor->user.ActorActionSet->Swim); actor->user.oz = actor->spr.pos.Z = actor->user.loz - Z(depth); - actor->spr.backupz(); + actor->backupz(); actor->user.Flags |= (SPR_SWIMMING); actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); } @@ -544,7 +544,7 @@ void KeepActorOnFloor(DSWActor* actor) actor->user.Flags &= ~(SPR_SWIMMING); actor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER); actor->user.oz = actor->spr.pos.Z = actor->user.loz; - actor->spr.backupz(); + actor->backupz(); } } @@ -559,7 +559,7 @@ void KeepActorOnFloor(DSWActor* actor) if (actor->user.Flags & (SPR_MOVED)) { actor->user.oz = actor->spr.pos.Z = actor->user.loz; - actor->spr.backupz(); + actor->backupz(); } else { @@ -569,7 +569,7 @@ void KeepActorOnFloor(DSWActor* actor) &ceilz, &ctrash, &florz, &ftrash); actor->user.oz = actor->spr.pos.Z = florz; - actor->spr.backupz(); + actor->backupz(); } #endif diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index 4ec21a25f..e10aa55dc 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -457,7 +457,7 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SETp action, PERSONALITYp perso { actor->spr.pos.Z += Z(depth); actor->user.loz = actor->spr.pos.Z; - actor->spr.backupz(); + actor->backupz(); } if (!action) diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index e6179ec33..d91167ba5 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -1396,7 +1396,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp) break; } - ppActor->spr.backuppos(); + ppActor->backuppos(); } void DoPlayerSetWadeDepth(PLAYERp pp) @@ -1451,14 +1451,14 @@ void DoPlayerCrawlHeight(PLAYERp pp) void UpdatePlayerSpriteAngle(PLAYERp pp) { DSWActor* plActor = pp->actor; - plActor->spr.backupang(); + plActor->backupang(); plActor->spr.ang = pp->angle.ang.asbuild(); plActor = pp->PlayerUnderActor; if (!Prediction && plActor) { - plActor->spr.backupang(); + plActor->backupang(); plActor->spr.ang = pp->angle.ang.asbuild(); } } @@ -6396,7 +6396,7 @@ void MoveSkipSavePos(void) while (auto actor = it.Next()) { if (!actor->hasU()) continue; - actor->spr.backuppos(); + actor->backuppos(); actor->user.oz = actor->spr.opos.Z; } } @@ -6413,7 +6413,7 @@ void MoveSkipSavePos(void) while (auto actor = it.Next()) { if (!actor->hasU()) continue; - actor->spr.backuppos(); + actor->backuppos(); actor->user.oz = actor->spr.opos.Z; } } @@ -6423,7 +6423,7 @@ void MoveSkipSavePos(void) // back up all sprite angles. while (auto actor = it.Next()) { - actor->spr.backupang(); + actor->backupang(); } } diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 6042d45f2..2ea4f9491 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -849,7 +849,7 @@ void SpawnUser(DSWActor* actor, short id, STATEp state) actor->user.motion_blur_num = 0; actor->user.motion_blur_dist = 256; - actor->spr.backuppos(); + actor->backuppos(); actor->user.oz = actor->spr.opos.Z; actor->user.active_range = MIN_ACTIVE_RANGE; @@ -6340,7 +6340,7 @@ Collision move_sprite(DSWActor* actor, int xchange, int ychange, int zchange, in void MissileWarpUpdatePos(DSWActor* actor, sectortype* sect) { - actor->spr.backuppos(); + actor->backuppos(); actor->user.oz = actor->spr.opos.Z; ChangeActorSect(actor, sect); MissileZrange(actor); @@ -6348,7 +6348,7 @@ void MissileWarpUpdatePos(DSWActor* actor, sectortype* sect) void ActorWarpUpdatePos(DSWActor* actor, sectortype* sect) { - actor->spr.backuppos(); + actor->backuppos(); actor->user.oz = actor->spr.opos.Z; ChangeActorSect(actor, sect); DoActorZrange(actor); diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index f11ed1026..678dbe623 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -840,7 +840,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECTp sop) itActor->user.RotNum = 0; - itActor->spr.backuppos(); + itActor->backuppos(); itActor->user.oz = itActor->spr.opos.Z; switch (itActor->spr.statnum) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 06b5d57dc..868864a1a 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -10261,13 +10261,13 @@ void SpawnBigGunFlames(DSWActor* actor, DSWActor* Operator, SECTOR_OBJECTp sop, { // move with sector its on expActor->spr.pos.Z = actor->sector()->floorz - actor->user.pos.Z; - expActor->spr.backupz(); + expActor->backupz(); } else { // move with the mid sector expActor->spr.pos.Z = sop->mid_sector->floorz - actor->user.pos.Z; - expActor->spr.backupz(); + expActor->backupz(); } expActor->user.pos.X = actor->user.pos.X; @@ -10309,7 +10309,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang) } SpawnExpZadjust(actor, expActor, Z(50), Z(10)); - expActor->spr.backuppos(); + expActor->backuppos(); } int SpawnGrenadeSmallExp(DSWActor* actor) @@ -10417,7 +10417,7 @@ void SpawnExpZadjust(DSWActor* actor, DSWActor* expActor, int upper_zsize, int l } } - expActor->spr.backupz(); + expActor->backupz(); } void SpawnMineExp(DSWActor* actor) @@ -10815,7 +10815,7 @@ int DoNapalm(DSWActor* actor) DoFindGroundPoint(expActor); MissileWaterAdjust(expActor); expActor->spr.pos.Z = expActor->user.loz; - expActor->spr.backupz(); + expActor->backupz(); if (actor->user.Flags & (SPR_UNDERWATER)) expActor->user.Flags |= SPR_UNDERWATER; @@ -11089,7 +11089,7 @@ bool MissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist) actor->spr.zvel = oldzvel; // update for interpolation - actor->spr.backuppos(); + actor->backuppos(); return retval; } @@ -11130,7 +11130,7 @@ bool TestMissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist, int zvel) actor->spr.zvel = oldzvel; // update for interpolation - actor->spr.backuppos(); + actor->backuppos(); return retval; } @@ -11274,7 +11274,7 @@ void InitSpellRing(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang + 512); - actorNew->spr.backuppos(); + actorNew->backuppos(); if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) actorNew->user.Flags |= (SPR_UNDERWATER); @@ -12678,7 +12678,7 @@ int InitStar(PLAYERp pp) if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew)) actorNew->user.Flags |= (SPR_UNDERWATER); - actorNew->spr.backuppos(); + actorNew->backuppos(); for (size_t i = 0; i < countof(dang); i++) { @@ -12715,7 +12715,7 @@ int InitStar(PLAYERp pp) actorNew2->user.change.Y = MOVEy(actorNew2->spr.xvel, actorNew2->spr.ang); actorNew2->user.change.Z = zvel; - actorNew2->spr.backuppos(); + actorNew2->backuppos(); } return 0; @@ -16636,7 +16636,7 @@ int HelpMissileLateral(DSWActor* actor, int dist) actor->spr.xvel = old_xvel; actor->spr.clipdist = old_clipdist; - actor->spr.backuppos(); + actor->backuppos(); return 0; } @@ -16992,7 +16992,7 @@ bool SpriteWarpToUnderwater(DSWActor* actor) actor->spr.pos.Z = underActor->sector()->ceilingz + actor->user.ceiling_dist+Z(1); - actor->spr.backuppos(); + actor->backuppos(); return true; } @@ -17067,7 +17067,7 @@ bool SpriteWarpToSurface(DSWActor* actor) MissileWaterAdjust(actor); - actor->spr.backuppos(); + actor->backuppos(); return true; }