From 9721d80f440cc19e958b922fd1833f9bf74cf138 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 9 Sep 2022 18:23:28 +0200 Subject: [PATCH] - more assignment wraps --- source/games/duke/src/bowling.cpp | 4 ++-- source/games/sw/src/actor.cpp | 4 ++-- source/games/sw/src/bunny.cpp | 2 +- source/games/sw/src/coolg.cpp | 2 +- source/games/sw/src/eel.cpp | 2 +- source/games/sw/src/hornet.cpp | 2 +- source/games/sw/src/lava.cpp | 2 +- source/games/sw/src/ninja.cpp | 2 +- source/games/sw/src/serp.cpp | 2 +- source/games/sw/src/skull.cpp | 4 ++-- source/games/sw/src/sumo.cpp | 2 +- source/games/sw/src/weapon.cpp | 4 ++-- source/games/sw/src/zilla.cpp | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/games/duke/src/bowling.cpp b/source/games/duke/src/bowling.cpp index c3e80fa22..3c2014ee4 100644 --- a/source/games/duke/src/bowling.cpp +++ b/source/games/duke/src/bowling.cpp @@ -184,11 +184,11 @@ void resetpins(sectortype* sect) spawned->spr.lotag = a2->spr.lotag; if (spawned->spr.lotag == 3 || spawned->spr.lotag == 5) { - spawned->spr.clipdist = (1 + (krand() % 1)) * 16 + 32; + spawned->set_native_clipdist((1 + (krand() % 1)) * 16 + 32); } else { - spawned->spr.clipdist = (1 + (krand() % 1)) * 16 + 32; + spawned->set_native_clipdist((1 + (krand() % 1)) * 16 + 32); } spawned->add_int_ang(-(((krand() & 32) - (krand() & 64)) & 2047)); } diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index b2d4d89d4..c3c9e9905 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -304,7 +304,7 @@ void DoDebrisCurrent(DSWActor* actor) int nx, ny; auto sectp = actor->sector(); - //actor->spr.clipdist = (256+128)>>2; + //actor->set_native_clipdist((256+128)>>2; double spd = sectp->speed / 64.0; auto vect = sectp->angle.ToVector() * spd; @@ -850,7 +850,7 @@ int DoActorDeathMove(DSWActor* actor) DoActorFall(actor); } - actor->spr.clipdist = (128+64)>>2; + actor->set_native_clipdist((128+64)>>2); move_actor(actor, DVector3(actor->spr.angle.ToVector() * actor->vel.X, 0)); diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 4b4df7c34..a18b40504 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -746,7 +746,7 @@ int SetupBunny(DSWActor* actor) actor->user.ShellNum = 0; // Not Pregnant right now actor->user.FlagOwner = 0; - actor->spr.clipdist = (150) >> 2; + actor->set_native_clipdist((150) >> 2); if (actor->spr.pal == PALETTE_PLAYER1) { diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index 88cde0630..3bc0e3ce2 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -507,7 +507,7 @@ int DoCoolgMatchPlayerZ(DSWActor* actor); void CoolgCommon(DSWActor* actor) { - actor->spr.clipdist = (200) >> 2; + actor->set_native_clipdist((200) >> 2); actor->user.floor_dist = (16); actor->user.ceiling_dist = (20); diff --git a/source/games/sw/src/eel.cpp b/source/games/sw/src/eel.cpp index 2f5a0273e..85cc33801 100644 --- a/source/games/sw/src/eel.cpp +++ b/source/games/sw/src/eel.cpp @@ -365,7 +365,7 @@ int DoEelMatchPlayerZ(DSWActor* actor); void EelCommon(DSWActor* actor) { - actor->spr.clipdist = (100) >> 2; + actor->set_native_clipdist((100) >> 2); actor->user.floor_dist = (16); actor->user.floor_dist = (16); actor->user.ceiling_dist = (20); diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index c5c6e3203..cd7cdd8e5 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -314,7 +314,7 @@ int SetupHornet(DSWActor* actor) actor->user.Flags |= (SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); - actor->spr.clipdist = (100) >> 2; + actor->set_native_clipdist((100) >> 2); actor->user.floor_dist = (16); actor->user.ceiling_dist = (16); diff --git a/source/games/sw/src/lava.cpp b/source/games/sw/src/lava.cpp index 19fd52eda..9762b9b40 100644 --- a/source/games/sw/src/lava.cpp +++ b/source/games/sw/src/lava.cpp @@ -475,7 +475,7 @@ int SetupLava(DSWActor* actor) EnemyDefaults(actor, &LavaActionSet, &LavaPersonality); actor->spr.xrepeat = actor->spr.yrepeat = 110; - actor->spr.clipdist = (512) >> 2; + actor->set_native_clipdist((512) >> 2); actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT); actor->user.loz = actor->spr.pos.Z; diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 14e1752e7..79b2a7010 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -2417,7 +2417,7 @@ void InitPlayerSprite(PLAYER* pp) actor->spr.picnum = actor->user.State->Pic; actor->spr.shade = -60; // was 15 - actor->spr.clipdist = (256 >> 2); + actor->set_native_clipdist(256 >> 2); actor->spr.xrepeat = PLAYER_NINJA_XREPEAT; actor->spr.yrepeat = PLAYER_NINJA_YREPEAT; diff --git a/source/games/sw/src/serp.cpp b/source/games/sw/src/serp.cpp index eb7544e24..f32b67664 100644 --- a/source/games/sw/src/serp.cpp +++ b/source/games/sw/src/serp.cpp @@ -727,7 +727,7 @@ int SetupSerp(DSWActor* actor) actor->spr.xrepeat = 128; } - actor->spr.clipdist = (512) >> 2; + actor->set_native_clipdist((512) >> 2); actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT); actor->user.loz = actor->spr.pos.Z; diff --git a/source/games/sw/src/skull.cpp b/source/games/sw/src/skull.cpp index 6b26253ca..c9d02bafd 100644 --- a/source/games/sw/src/skull.cpp +++ b/source/games/sw/src/skull.cpp @@ -232,7 +232,7 @@ int SetupSkull(DSWActor* actor) actor->user.ID = SKULL_R0; EnemyDefaults(actor, nullptr, nullptr); - actor->spr.clipdist = (128+64) >> 2; + actor->set_native_clipdist((128+64) >> 2); actor->user.Flags |= (SPR_XFLIP_TOGGLE); actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); @@ -650,7 +650,7 @@ int SetupBetty(DSWActor* actor) actor->user.ID = BETTY_R0; EnemyDefaults(actor, nullptr, nullptr); - actor->spr.clipdist = (128+64) >> 2; + actor->set_native_clipdist((128+64) >> 2); actor->user.Flags |= (SPR_XFLIP_TOGGLE); actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 92c2b18fc..c4d3d10ea 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -624,7 +624,7 @@ int SetupSumo(DSWActor* actor) EnemyDefaults(actor, &SumoActionSet, &SumoPersonality); - actor->spr.clipdist = (512) >> 2; + actor->set_native_clipdist((512) >> 2); if (actor->spr.pal == 16) { // Mini Sumo diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index ccf086489..f7262d783 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -12003,7 +12003,7 @@ int InitSerpRing(DSWActor* actor) change_actor_stat(actorNew, STAT_SKIP4); actorNew->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY); - actorNew->spr.clipdist = (128+64) >> 2; + actorNew->set_native_clipdist((128+64) >> 2); actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); @@ -12729,7 +12729,7 @@ int InitSumoSkull(DSWActor* actor) EnemyDefaults(actorNew, nullptr, nullptr); actorNew->spr.extra |= SPRX_PLAYER_OR_ENEMY; - actorNew->spr.clipdist = (128+64) >> 2; + actorNew->set_native_clipdist((128+64) >> 2); actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); diff --git a/source/games/sw/src/zilla.cpp b/source/games/sw/src/zilla.cpp index 71c1a61f6..950c233fb 100644 --- a/source/games/sw/src/zilla.cpp +++ b/source/games/sw/src/zilla.cpp @@ -630,7 +630,7 @@ int SetupZilla(DSWActor* actor) EnemyDefaults(actor, &ZillaActionSet, &ZillaPersonality); - actor->spr.clipdist = (512) >> 2; + actor->set_native_clipdist((512) >> 2); actor->spr.xrepeat = 97; actor->spr.yrepeat = 79;