diff --git a/source/games/blood/src/db.cpp b/source/games/blood/src/db.cpp index 620236fd4..2722b987d 100644 --- a/source/games/blood/src/db.cpp +++ b/source/games/blood/src/db.cpp @@ -50,7 +50,7 @@ DBloodActor* InsertSprite(sectortype* pSector, int nStat) { auto act = static_cast(::InsertActor(RUNTIME_CLASS(DBloodActor), pSector, nStat)); act->spr.cstat = CSTAT_SPRITE_YCENTER; - act->set_const_clipdist(32); + act->clipdist = 8; act->spr.xrepeat = act->spr.yrepeat = 64; return act; } diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 94ca2b36a..48b83a31f 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -1550,7 +1550,7 @@ void forcesphere(DDukeActor* actor, int forcesphere) if (k) { k->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_YCENTER; - k->set_const_clipdist(64); + k->clipdist = 16; k->spr.angle = j; k->vel.Z = l.Sin() * 2; k->vel.X = l.Cos() * 2; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index dedd82aa5..26c3a6841 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -581,19 +581,19 @@ void respawn_rrra(DDukeActor* oldact, DDukeActor* newact) { newact->spr.xrepeat = 36; newact->spr.yrepeat = 36; - newact->set_const_clipdist(100); + newact->clipdist = 25; } else if (newact->spr.pal == 32) { newact->spr.xrepeat = 50; newact->spr.yrepeat = 50; - newact->set_const_clipdist(100); + newact->clipdist = 25; } else { newact->spr.xrepeat = 50; newact->spr.yrepeat = 50; - newact->set_const_clipdist(100); + newact->clipdist = 25; } } diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index f8a756bca..d7f58e7a4 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -2234,7 +2234,7 @@ int ParseState::parse(void) g_ac->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; g_ac->spr.shade = -12; - g_ac->set_const_clipdist(64); + g_ac->clipdist = 16; g_ac->spr.xrepeat = 42; g_ac->spr.yrepeat = 36; g_ac->SetOwner(g_ac); diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 36844bd3d..374e59a1e 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -137,7 +137,7 @@ static void shootfireball(DDukeActor *actor, int p, DVector3 pos, DAngle ang) } spawned->spr.yint = p; spawned->spr.cstat = CSTAT_SPRITE_YCENTER; - spawned->set_const_clipdist(4); + spawned->clipdist = 1; } } @@ -213,7 +213,7 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, DVector3 spos, DAng spawned->spr.angle = sang; spawned->spr.xrepeat = 2; spawned->spr.yrepeat = 2; - spawned->set_const_clipdist(40); + spawned->clipdist = 10; spawned->spr.yint = p; spawned->SetOwner(actor); @@ -677,7 +677,7 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a } spawned->spr.cstat = CSTAT_SPRITE_YCENTER; - spawned->set_const_clipdist(4); + spawned->clipdist = 1; ang = actor->spr.angle + DAngle22_5 / 4 - randomAngle(22.5 / 2); zvel = oldzvel + 2 - krandf(4); @@ -841,9 +841,9 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw spawned->spr.cstat = CSTAT_SPRITE_YCENTER; if (atwith == RPG) - spawned->set_const_clipdist(4); + spawned->clipdist = 1; else - spawned->set_const_clipdist(40); + spawned->clipdist = 10; } @@ -1068,7 +1068,7 @@ static void shootshrinker(DDukeActor* actor, int p, const DVector3& pos, DAngle if (spawned) { spawned->spr.cstat = CSTAT_SPRITE_YCENTER; - spawned->set_const_clipdist(32); + spawned->clipdist = 8; } } diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index f8e440680..bacfceb39 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -574,7 +574,7 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a if (!spawned) return; spawned->spr.extra += (krand() & 7); spawned->spr.cstat = CSTAT_SPRITE_YCENTER; - spawned->set_const_clipdist(4); + spawned->clipdist = 1; ang = actor->spr.angle + DAngle22_5 / 4 + randomAngle(22.5 / 2); zvel = oldzvel + 2 - krandf(4); @@ -735,9 +735,9 @@ static void shootrpg(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int atw spawned->spr.cstat = CSTAT_SPRITE_YCENTER; if (atwith == RPG || (atwith == RPG2 && isRRRA())) - spawned->set_const_clipdist(4); + spawned->clipdist = 1; else - spawned->set_const_clipdist(40); + spawned->clipdist = 10; } @@ -810,7 +810,7 @@ static void shootwhip(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int at if (!spawned) return; spawned->spr.extra += (krand() & 7); spawned->spr.cstat = CSTAT_SPRITE_YCENTER; - spawned->set_const_clipdist(4); + spawned->clipdist = 1; ang = actor->spr.angle + DAngle22_5/4 - randomAngle(DAngle22_5/2); zvel = oldzvel + 2 - krandf(4); @@ -3389,7 +3389,7 @@ void processinput_r(int snum) if (psectlotag == 857) pact->set_const_clipdist(1); else - pact->set_const_clipdist(64); + pact->clipdist = 16; p->spritebridge = 0; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 54b08dc00..daf4edb6a 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -619,7 +619,7 @@ void resetpspritevars(int g) act->spr.yrepeat = isRR() ? 17 : 36; act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; act->spr.xoffset = 0; - act->set_const_clipdist(64); + act->clipdist = 16; if (ps[j].last_extra == 0) { diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index 4c63f889a..bf4df91e7 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -252,7 +252,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act) if (!isRR() || actorflag(act, SFLAG_KILLCOUNT)) // Duke is just like Doom - Bad guys always count as kill. ps[myconnectindex].max_actors_killed++; - act->set_const_clipdist(80); + act->clipdist = 20; if (actj) { if (actj->spr.picnum == RESPAWN) @@ -263,7 +263,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act) } else { - act->set_const_clipdist(40); + act->clipdist = 10; act->SetOwner(act); ChangeActorStat(act, STAT_ACTOR); } diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index f97d51bf5..1c845d71e 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -62,7 +62,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* act->spr.pal = actj->spr.pal; if (act->spr.pal != 0) { - act->set_const_clipdist(80); + act->clipdist = 20; act->spr.xrepeat = 40; act->spr.yrepeat = 40; } @@ -77,7 +77,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* { act->spr.xrepeat = 40; act->spr.yrepeat = 40; - act->set_const_clipdist(80); + act->clipdist = 20; } if (actj) @@ -416,7 +416,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* case PIPE4: case PIPE5: case PIPE6: - act->set_const_clipdist(32); + act->clipdist = 8; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; [[fallthrough]]; case OCEANSPRITE4: @@ -492,12 +492,12 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* if (act->spr.picnum == QUEBALL || act->spr.picnum == STRIPEBALL) { act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN; - act->set_const_clipdist(8); + act->clipdist = 2; } else { act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(32); + act->clipdist = 8; } ChangeActorStat(act, 2); @@ -530,7 +530,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* else { act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(128); + act->clipdist = 32; } [[fallthrough]]; case MIKE: @@ -833,7 +833,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* act->spr.pal = actj->spr.pal; if (act->spr.pal && (!isWorldTour() || !(currentLevel->flags & LEVEL_WT_BOSSSPAWN) || act->spr.pal != 22)) { - act->set_const_clipdist(80); + act->clipdist = 20; act->spr.xrepeat = 40; act->spr.yrepeat = 40; } @@ -850,13 +850,13 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* { act->spr.xrepeat = 40; act->spr.yrepeat = 40; - act->set_const_clipdist(80); + act->clipdist = 20; } else { act->spr.xrepeat = 60; act->spr.yrepeat = 60; - act->set_const_clipdist(40); + act->clipdist = 10; } } @@ -1169,7 +1169,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* case STALL: act->spr.lotag = 1; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->SetOwner(act); break; case CANWITHSOMETHING: @@ -1190,7 +1190,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* if (actj) act->spr.xrepeat = act->spr.yrepeat = 32; - act->set_const_clipdist(72); + act->clipdist = 18; makeitfall(act); if (actj) act->SetOwner(actj); else act->SetOwner(act); diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index 436c4bda9..86c6b3293 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -411,7 +411,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case PIPE4: case PIPE5: case PIPE6: - act->set_const_clipdist(32); + act->clipdist = 8; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; ChangeActorStat(act, 0); break; @@ -446,18 +446,18 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* if (act->spr.picnum == QUEBALL || act->spr.picnum == STRIPEBALL) { act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN; - act->set_const_clipdist(8); + act->clipdist = 2; } else { act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(32); + act->clipdist = 8; } ChangeActorStat(act, 2); break; case BOWLINGBALL: act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN; - act->set_const_clipdist(64); + act->clipdist = 16; act->spr.xrepeat = 11; act->spr.yrepeat = 9; ChangeActorStat(act, 2); @@ -477,14 +477,14 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case RRTILE297: act->spr.xrepeat = 64; act->spr.yrepeat = 64; - act->set_const_clipdist(64); + act->clipdist = 16; ChangeActorStat(act, 108); break; case RRTILE3190: case RRTILE3191: case RRTILE3192: act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->spr.xrepeat = 32; act->spr.yrepeat = 26; act->vel.X = 2; @@ -492,7 +492,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* break; case RRTILE3120: act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->spr.xrepeat = 12; act->spr.yrepeat = 10; act->vel.X = 2; @@ -508,7 +508,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* break; case RRTILE3123: act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->spr.xrepeat = 13; act->spr.yrepeat = 13; act->vel.X = 1; @@ -516,7 +516,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* break; case RRTILE3124: act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->spr.xrepeat = 17; act->spr.yrepeat = 12; act->vel.X = 2; @@ -524,7 +524,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* break; case RRTILE3132: act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->spr.xrepeat = 13; act->spr.yrepeat = 10; act->vel.X = 0; @@ -559,7 +559,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* else { act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(128); + act->clipdist = 32; } [[fallthrough]]; case MIKE: @@ -845,7 +845,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case DRONE: act->spr.xrepeat = 14; act->spr.yrepeat = 7; - act->set_const_clipdist(128); + act->clipdist = 32; break; case SBSWIPE: case BILLYPLAY: @@ -876,7 +876,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* { act->spr.xrepeat = 21; act->spr.yrepeat = 15; - act->set_const_clipdist(64); + act->clipdist = 16; } break; case MINION: @@ -918,30 +918,30 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* { act->spr.xrepeat = 36; act->spr.yrepeat = 36; - act->set_const_clipdist(100); + act->clipdist = 25; } else if (act->spr.pal == 32) { act->spr.xrepeat = 50; act->spr.yrepeat = 50; - act->set_const_clipdist(100); + act->clipdist = 25; } else { act->spr.xrepeat = 50; act->spr.yrepeat = 50; - act->set_const_clipdist(100); + act->clipdist = 25; } break; case BIKERB: act->spr.xrepeat = 28; act->spr.yrepeat = 22; - act->set_const_clipdist(72); + act->clipdist = 18; break; case BIKERBV2: act->spr.xrepeat = 28; act->spr.yrepeat = 22; - act->set_const_clipdist(72); + act->clipdist = 18; break; case BIKER: act->spr.xrepeat = 28; @@ -951,7 +951,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case CHEERB: act->spr.xrepeat = 28; act->spr.yrepeat = 22; - act->set_const_clipdist(72); + act->clipdist = 18; break; case CHEER: case CHEERSTAYPUT: @@ -1443,7 +1443,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case RRTILE2122: act->spr.lotag = 1; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - act->set_const_clipdist(8); + act->clipdist = 2; act->SetOwner(act); break; case CANWITHSOMETHING: @@ -1461,7 +1461,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* if (actj) act->spr.xrepeat = act->spr.yrepeat = 32; - act->set_const_clipdist(72); + act->clipdist = 18; makeitfall(act); if (actj) act->SetOwner(actj); else act->SetOwner(act); diff --git a/source/games/exhumed/src/fish.cpp b/source/games/exhumed/src/fish.cpp index 47c4a8a43..8d161aafa 100644 --- a/source/games/exhumed/src/fish.cpp +++ b/source/games/exhumed/src/fish.cpp @@ -175,7 +175,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.shade = -12; - pActor->set_const_clipdist(80); + pActor->clipdist = 20; pActor->spr.xrepeat = 40; pActor->spr.yrepeat = 40; pActor->spr.pal = pActor->sector()->ceilingpal; diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index d07f96d91..3d68295f7 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -1222,7 +1222,7 @@ DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial) pActor->spr.yoffset = 0; pActor->spr.picnum = nPic; pActor->spr.lotag = runlist_HeadRun() + 1; - pActor->set_const_clipdist(40); + pActor->clipdist = 10; // GrabTimeSlot(3); diff --git a/source/games/exhumed/src/mummy.cpp b/source/games/exhumed/src/mummy.cpp index 4e9ec08da..599269a49 100644 --- a/source/games/exhumed/src/mummy.cpp +++ b/source/games/exhumed/src/mummy.cpp @@ -58,7 +58,7 @@ void BuildMummy(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.shade = -12; - pActor->set_const_clipdist(32); + pActor->clipdist = 8; pActor->vel.X = 0; pActor->vel.Y = 0; pActor->vel.Z = 0; diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index 84484ea05..5a11cdb1e 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -424,7 +424,7 @@ void BuildTail() pTailActor->spr.shade = -12; pTailActor->spr.hitag = 0; pTailActor->spr.cstat = 0; - pTailActor->set_const_clipdist(100); + pTailActor->clipdist = 25; pTailActor->spr.xrepeat = 80; pTailActor->spr.yrepeat = 80; pTailActor->spr.picnum = 1; @@ -1181,7 +1181,7 @@ void BuildQueen(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; pActor->spr.pal = 0; pActor->spr.shade = -12; - pActor->set_const_clipdist(100); + pActor->clipdist = 25; pActor->spr.xrepeat = 80; pActor->spr.yrepeat = 80; pActor->spr.xoffset = 0; diff --git a/source/games/exhumed/src/rex.cpp b/source/games/exhumed/src/rex.cpp index a9c94d873..72c099ade 100644 --- a/source/games/exhumed/src/rex.cpp +++ b/source/games/exhumed/src/rex.cpp @@ -58,7 +58,7 @@ void BuildRex(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D } pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; - pActor->set_const_clipdist(80); + pActor->clipdist = 20; pActor->spr.shade = -12; pActor->spr.xrepeat = 64; pActor->spr.yrepeat = 64;