- manual set_const_clipdist replacements

This commit is contained in:
Christoph Oelckers 2022-10-04 19:13:26 +02:00
parent 48fda0cafd
commit d22c473c31
29 changed files with 47 additions and 53 deletions

View file

@ -177,11 +177,6 @@ public:
return clipdist * 4;
}
void set_const_clipdist(int val) // only for searching purposes
{
clipdist = val * 0.25;
}
void copy_clipdist(DCoreActor* other)
{
clipdist = other->clipdist;

View file

@ -95,7 +95,7 @@ void FlareBurst(DBloodActor* actor, sectortype*) // 2
spawnedactor->spr.shade = -128;
spawnedactor->spr.xrepeat = spawnedactor->spr.yrepeat = 32;
spawnedactor->spr.type = kMissileFlareAlt;
spawnedactor->set_const_clipdist(2);
spawnedactor->clipdist = 0.5;
spawnedactor->SetOwner(actor);
auto spAngVec = DAngle::fromBam(i << 29).ToVector().Rotated90CW() * nRadius;
if (i & 1) spAngVec *= 0.5;

View file

@ -575,7 +575,7 @@ void respawn_rrra(DDukeActor* oldact, DDukeActor* newact)
{
newact->spr.xrepeat = 26;
newact->spr.yrepeat = 26;
newact->set_const_clipdist(75);
newact->clipdist = 18.75;
}
else if (newact->spr.pal == 31)
{

View file

@ -3387,7 +3387,7 @@ void processinput_r(int snum)
psectlotag = 1;
if (psectlotag == 857)
pact->set_const_clipdist(1);
pact->clipdist = 0.25;
else
pact->clipdist = 16;

View file

@ -70,7 +70,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 80;
act->spr.yrepeat = 80;
act->set_const_clipdist(164);
act->clipdist = 41;
}
}
else
@ -841,7 +841,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 80;
act->spr.yrepeat = 80;
act->set_const_clipdist(164);
act->clipdist = 41;
}
}
else
@ -1206,7 +1206,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
if (act->spr.picnum == EGG)
{
act->set_const_clipdist(24);
act->clipdist = 6;
ps[connecthead].max_actors_killed++;
}
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();

View file

@ -464,7 +464,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case HENSTAND:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_const_clipdist(48);
act->clipdist = 12;
act->spr.xrepeat = 21;
act->spr.yrepeat = 15;
ChangeActorStat(act, 2);
@ -500,7 +500,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3122:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_const_clipdist(2);
act->clipdist = 0.5;
act->spr.xrepeat = 8;
act->spr.yrepeat = 6;
act->vel.X = 1;
@ -532,7 +532,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case BOWLINGPIN:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_const_clipdist(48);
act->clipdist = 12;
act->spr.xrepeat = 23;
act->spr.yrepeat = 23;
ChangeActorStat(act, 2);
@ -912,7 +912,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 26;
act->spr.yrepeat = 26;
act->set_const_clipdist(75);
act->clipdist = 18.75;
}
else if (act->spr.pal == 31)
{
@ -1476,7 +1476,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
{
if (act->spr.picnum == EGG)
act->set_const_clipdist(24);
act->clipdist = 6;
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
ChangeActorStat(act, STAT_ZOMBIEACTOR);
}
@ -1489,7 +1489,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = 1;
act->spr.yrepeat = 1;
act->set_const_clipdist(1);
act->clipdist = 0.25;
ChangeActorStat(act, 100);
break;
}

View file

@ -91,7 +91,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, const DVector
pActor->spr.shade = -12;
}
pActor->set_const_clipdist(10);
pActor->clipdist = 2.5;
pActor->spr.xrepeat = nRepeat;
pActor->spr.yrepeat = nRepeat;
pActor->spr.picnum = 1;

View file

@ -70,7 +70,7 @@ void BuildAnubis(DExhumedActor* ap, const DVector3& pos, sectortype* pSector, DA
ap->spr.yoffset = 0;
ap->spr.picnum = 1;
ap->spr.pal = ap->sector()->ceilingpal;
ap->set_const_clipdist(60);
ap->clipdist = 15;
ap->spr.angle = nAngle;
ap->spr.xrepeat = 40;
ap->spr.yrepeat = 40;

View file

@ -58,7 +58,7 @@ DExhumedActor* BuildBubble(const DVector3& pos, sectortype* pSector)
pActor->spr.cstat = 0;
pActor->spr.shade = -32;
pActor->spr.pal = 0;
pActor->set_const_clipdist(5);
pActor->clipdist = 1.25;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.xoffset = 0;

View file

@ -630,7 +630,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, double fZOffset, DA
pBulletActor->spr.pal = 0;
}
pBulletActor->set_const_clipdist(25);
pBulletActor->clipdist = 6.25;
int nRepeat = pBulletInfo->xyRepeat;
if (nRepeat < 0) {

View file

@ -132,7 +132,7 @@ void BuildGrenade(int nPlayer)
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->spr.picnum = 1;
pActor->spr.pal = 0;
pActor->set_const_clipdist(30);
pActor->clipdist = 7.5;
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->spr.angle = pPlayerActor->spr.angle;

View file

@ -118,7 +118,7 @@ void BuildLava(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.yrepeat = 200;
pActor->spr.shade = -12;
pActor->spr.pal = 0;
pActor->set_const_clipdist(127);
pActor->clipdist = 31.75;
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->spr.picnum = seq_GetSeqPicnum(kSeqLavag, LavadudeSeq[3].a, 0);

View file

@ -56,7 +56,7 @@ void BuildLion(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
}
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->set_const_clipdist(60);
pActor->clipdist = 15;
pActor->spr.shade = -12;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;

View file

@ -1348,7 +1348,7 @@ void AITrap::Tick(RunListEvent* ev)
}
else
{
pBullet->set_const_clipdist(50);
pBullet->clipdist = 12.5;
auto pWall = sTrap[nTrap].pWall1;
if (pWall)
@ -1439,7 +1439,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
pSpark->spr.pos.Z = pActor->spr.pos.Z;
pSpark->spr.lotag = runlist_HeadRun() + 1;
pSpark->set_const_clipdist(1);
pSpark->clipdist = 0.25;
pSpark->spr.hitag = 0;
pSpark->backuppos();

View file

@ -321,7 +321,7 @@ void RestartPlayer(int nPlayer)
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->spr.shade = -12;
pActor->set_const_clipdist(58);
pActor->clipdist = 14.5;
pActor->spr.pal = 0;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;

View file

@ -468,7 +468,7 @@ void BuildQueenEgg(int nQueen, int nVal)
pActor2->spr.pos = DVector3(pActor->spr.pos.XY(), pSector->floorz);
pActor2->spr.pal = 0;
pActor2->set_const_clipdist(50);
pActor2->clipdist = 12.5;
pActor2->spr.xoffset = 0;
pActor2->spr.yoffset = 0;
pActor2->spr.shade = -12;
@ -748,7 +748,7 @@ void BuildQueenHead(int nQueen)
pActor2->spr.pos.XY() = pActor->spr.pos.XY();
pActor2->spr.pos.Z = pSector->floorz;
pActor2->set_const_clipdist(70);
pActor2->clipdist = 17.5;
pActor2->spr.xrepeat = 80;
pActor2->spr.yrepeat = 80;
pActor2->spr.cstat = 0;

View file

@ -110,7 +110,7 @@ void BuildRat(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D
pActor->spr.yoffset = 0;
pActor->spr.picnum = 1;
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->set_const_clipdist(30);
pActor->clipdist = 7.5;
pActor->spr.angle = nAngle;
pActor->spr.xrepeat = 50;
pActor->spr.yrepeat = 50;

View file

@ -60,7 +60,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, const DVector3& pos, sectortyp
pActor->spr.yoffset = 0;
pActor->spr.picnum = 1;
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->set_const_clipdist(60);
pActor->clipdist = 15;
pActor->spr.angle = angle;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;

View file

@ -59,7 +59,7 @@ void BuildScorp(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
}
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->set_const_clipdist(70);
pActor->clipdist = 17.5;
pActor->spr.shade = -12;
pActor->spr.xrepeat = 80;
pActor->spr.yrepeat = 80;

View file

@ -61,7 +61,7 @@ void BuildSet(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->spr.shade = -12;
pActor->set_const_clipdist(110);
pActor->clipdist = 27.5;
pActor->vel.X = 0;
pActor->vel.Y = 0;
pActor->vel.Z = 0;
@ -112,7 +112,7 @@ void BuildSoul(DExhumedActor* pSet)
pActor->spr.xrepeat = 1;
pActor->spr.yrepeat = 1;
pActor->spr.pal = 0;
pActor->set_const_clipdist(5);
pActor->clipdist = 1.25;
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->spr.picnum = seq_GetSeqPicnum(kSeqSet, 75, 0);

View file

@ -226,7 +226,7 @@ void BuildSnake(int nPlayer, double zVal)
pActor->spr.yrepeat = 40 - 3 * i;
}
pActor->set_const_clipdist(10);
pActor->clipdist = 2.5;
pActor->spr.cstat = 0;
pActor->spr.shade = -64;
pActor->spr.pal = 0;

View file

@ -59,7 +59,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, const DVector3& pos, sectortype*
spp->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
spp->spr.shade = -12;
spp->set_const_clipdist(15);
spp->clipdist = 3.75;
spp->vel.X = 0;
spp->vel.Y = 0;
spp->vel.Z = 0;

View file

@ -57,7 +57,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, const DVector3& pos, sectortype*
pActor->spr.shade = -12;
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->spr.pal = pActor->sector()->ceilingpal;
pActor->set_const_clipdist(70);
pActor->clipdist = 17.5;
if (bEggWasp)
{

View file

@ -304,7 +304,6 @@ void DoDebrisCurrent(DSWActor* actor)
int nx, ny;
auto sectp = actor->sector();
//actor->set_const_clipdist((256+128)>>2;
double spd = sectp->speed / 64.0;
auto vect = sectp->angle.ToVector() * spd;
@ -850,7 +849,7 @@ int DoActorDeathMove(DSWActor* actor)
DoActorFall(actor);
}
actor->set_const_clipdist((128+64)>>2);
actor->clipdist = 12;
move_actor(actor, DVector3(actor->spr.angle.ToVector() * actor->vel.X, 0));

View file

@ -746,7 +746,7 @@ int SetupBunny(DSWActor* actor)
actor->user.ShellNum = 0; // Not Pregnant right now
actor->user.FlagOwner = 0;
actor->set_const_clipdist((150) >> 2);
actor->clipdist = 9.25;
if (actor->spr.pal == PALETTE_PLAYER1)
{
@ -755,7 +755,7 @@ int SetupBunny(DSWActor* actor)
actor->spr.xrepeat = 96;
actor->spr.yrepeat = 90;
actor->set_const_clipdist(200>>2);
actor->clipdist = 12.5;
if (!(actor->spr.cstat & CSTAT_SPRITE_RESTORE))
actor->user.Health = 60;

View file

@ -507,7 +507,7 @@ int DoCoolgMatchPlayerZ(DSWActor* actor);
void CoolgCommon(DSWActor* actor)
{
actor->set_const_clipdist((200) >> 2);
actor->clipdist = 12.5;
actor->user.floor_dist = (16);
actor->user.ceiling_dist = (20);

View file

@ -365,7 +365,7 @@ int DoEelMatchPlayerZ(DSWActor* actor);
void EelCommon(DSWActor* actor)
{
actor->set_const_clipdist((100) >> 2);
actor->clipdist = 6.25;
actor->user.floor_dist = (16);
actor->user.floor_dist = (16);
actor->user.ceiling_dist = (20);

View file

@ -314,7 +314,7 @@ int SetupHornet(DSWActor* actor)
actor->user.Flags |= (SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE);
actor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actor->set_const_clipdist((100) >> 2);
actor->clipdist = 6.25;
actor->user.floor_dist = (16);
actor->user.ceiling_dist = (16);

View file

@ -8111,7 +8111,7 @@ int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor)
SetOwner(GetOwner(wActor), actorNew);
SetAttach(sActor, actorNew);
actorNew->spr.yrepeat = 0;
actorNew->set_const_clipdist(8>>2);
actorNew->clipdist = 0.5;
actorNew->user.WaitTics = 120+60;
actorNew->user.Radius = 50;
@ -12070,7 +12070,7 @@ void InitSpellNapalm(PLAYER* pp)
actor->user.Dist = 12.5;
auto oclipdist = plActor->native_clipdist();
plActor->set_const_clipdist(1);
plActor->clipdist = 0.25;
if (mp[i].dist_over != 0)
{
@ -12146,7 +12146,7 @@ int InitEnemyNapalm(DSWActor* actor)
actorNew->user.Dist = 12.5;
auto oclipdist = actor->clipdist;
actor->set_const_clipdist(1);
actor->clipdist = 0.25;
if (mp[i].dist_over != 0)
{
@ -12660,7 +12660,7 @@ int InitSumoNapalm(DSWActor* actor)
actorNew->user.Dist = 12.5;
auto oclipdist = actor->clipdist;
actor->set_const_clipdist(1);
actor->clipdist = 0.25;
if (mp[i].dist_over != 0)
{
@ -13177,7 +13177,7 @@ void InitHeartAttack(PLAYER* pp)
actorNew->user.Dist = 12.5;
auto oclipdist = plActor->native_clipdist();
plActor->set_const_clipdist(1);
plActor->clipdist = 0.25;
UpdateChange(actorNew);
@ -14561,7 +14561,7 @@ int InitSerpSpell(DSWActor* actor)
actorNew->user.Dist = 12.5;
auto oclipdist = actor->clipdist;
actor->set_const_clipdist(1);
actor->clipdist = 0.25;
actorNew->spr.angle += lat_ang[i];
HelpMissileLateral(actorNew, 4200);
@ -14665,7 +14665,7 @@ int InitSerpMonstSpell(DSWActor* actor)
actorNew->user.Dist = 12.5;
auto oclipdist = actor->clipdist;
actor->set_const_clipdist(1);
actor->clipdist = 0.25;
actorNew->spr.angle += lat_ang[i];
HelpMissileLateral(actorNew, 4200);
@ -17138,7 +17138,7 @@ int InitEnemyFireball(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->vel.Z = 0;
actorNew->set_const_clipdist(16>>2);
actorNew->clipdist = 1;
actorNew->spr.angle += lat_ang[i];
HelpMissileLateral(actorNew, 500);
@ -17614,7 +17614,7 @@ DSWActor* SpawnBubble(DSWActor* actor)
actorNew->spr.shade = actor->sector()->floorshade - 10;
actorNew->user.WaitTics = 120 * 120;
actorNew->vel.Z = 2;
actorNew->set_const_clipdist(12 >> 2);
actorNew->clipdist = 0.75;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.Flags |= (SPR_UNDERWATER);
actorNew->spr.shade = -60; // Make em brighter