- renaming stuff for search purposes

This commit is contained in:
Christoph Oelckers 2022-09-09 18:24:22 +02:00
parent cb0be471d1
commit ef47040630
51 changed files with 229 additions and 224 deletions

View file

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

View file

@ -374,7 +374,7 @@ static void ThrowThing(DBloodActor* actor, bool impact)
spawned->xspr.data3 = 512 / (gGameOptions.nDifficulty + 1);
spawned->spr.cstat &= ~CSTAT_SPRITE_BLOCK;
spawned->spr.pal = 6;
spawned->set_native_clipdist(0);
spawned->set_const_clipdist(0);
spawned->SetTarget(actor->GetTarget());
spawned->xspr.Proximity = true;
spawned->xspr.stateTimer = 1;

View file

@ -96,7 +96,7 @@ void FlareBurst(DBloodActor* actor, sectortype*) // 2
spawnedactor->spr.shade = -128;
spawnedactor->spr.xrepeat = spawnedactor->spr.yrepeat = 32;
spawnedactor->spr.type = kMissileFlareAlt;
spawnedactor->set_native_clipdist(2);
spawnedactor->set_const_clipdist(2);
spawnedactor->SetOwner(actor);
int nAngle2 = (i << 11) / 8;
int dx = 0;

View file

@ -50,7 +50,7 @@ DBloodActor* InsertSprite(sectortype* pSector, int nStat)
{
auto act = static_cast<DBloodActor*>(::InsertActor(RUNTIME_CLASS(DBloodActor), pSector, nStat));
act->spr.cstat = CSTAT_SPRITE_YCENTER;
act->set_native_clipdist(32);
act->set_const_clipdist(32);
act->spr.xrepeat = act->spr.yrepeat = 64;
return act;
}

View file

@ -1553,7 +1553,7 @@ void forcesphere(DDukeActor* actor, int forcesphere)
if (k)
{
k->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_YCENTER;
k->set_native_clipdist(64);
k->set_const_clipdist(64);
k->set_int_ang(j);
k->set_int_zvel(bsin(l, -5));
k->set_int_xvel(bcos(l, -9));

View file

@ -578,25 +578,25 @@ void respawn_rrra(DDukeActor* oldact, DDukeActor* newact)
{
newact->spr.xrepeat = 26;
newact->spr.yrepeat = 26;
newact->set_native_clipdist(75);
newact->set_const_clipdist(75);
}
else if (newact->spr.pal == 31)
{
newact->spr.xrepeat = 36;
newact->spr.yrepeat = 36;
newact->set_native_clipdist(100);
newact->set_const_clipdist(100);
}
else if (newact->spr.pal == 32)
{
newact->spr.xrepeat = 50;
newact->spr.yrepeat = 50;
newact->set_native_clipdist(100);
newact->set_const_clipdist(100);
}
else
{
newact->spr.xrepeat = 50;
newact->spr.yrepeat = 50;
newact->set_native_clipdist(100);
newact->set_const_clipdist(100);
}
}

View file

@ -2228,7 +2228,7 @@ int ParseState::parse(void)
g_ac->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
g_ac->spr.shade = -12;
g_ac->set_native_clipdist(64);
g_ac->set_const_clipdist(64);
g_ac->spr.xrepeat = 42;
g_ac->spr.yrepeat = 36;
g_ac->SetOwner(g_ac);

View file

@ -136,7 +136,7 @@ static void shootfireball(DDukeActor *actor, int p, int sx, int sy, int sz, int
}
spawned->spr.yint = p;
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
spawned->set_native_clipdist(4);
spawned->set_const_clipdist(4);
}
}
@ -206,7 +206,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_native_clipdist(40);
spawned->set_const_clipdist(40);
spawned->spr.yint = p;
spawned->SetOwner(actor);
@ -656,7 +656,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
}
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
spawned->set_native_clipdist(4);
spawned->set_const_clipdist(4);
sa = actor->int_ang() + 32 - (krand() & 63);
zvel = oldzvel + 512 - (krand() & 1023);
@ -821,9 +821,9 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
if (atwith == RPG)
spawned->set_native_clipdist(4);
spawned->set_const_clipdist(4);
else
spawned->set_native_clipdist(40);
spawned->set_const_clipdist(40);
}
@ -1163,7 +1163,7 @@ void shoot_d(DDukeActor* actor, int atwith)
if (spawned)
{
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
spawned->set_native_clipdist(32);
spawned->set_const_clipdist(32);
}

View file

@ -574,7 +574,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
if (!j) return;
j->spr.extra += (krand() & 7);
j->spr.cstat = CSTAT_SPRITE_YCENTER;
j->set_native_clipdist(4);
j->set_const_clipdist(4);
sa = actor->int_ang() + 32 - (krand() & 63);
zvel = oldzvel + 512 - (krand() & 1023);
@ -732,9 +732,9 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
if (atwith == RPG || (atwith == RPG2 && isRRRA()))
spawned->set_native_clipdist(4);
spawned->set_const_clipdist(4);
else
spawned->set_native_clipdist(40);
spawned->set_const_clipdist(40);
}
@ -805,7 +805,7 @@ static void shootwhip(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
if (!j) return;
j->spr.extra += (krand() & 7);
j->spr.cstat = CSTAT_SPRITE_YCENTER;
j->set_native_clipdist(4);
j->set_const_clipdist(4);
sa = actor->int_ang() + 32 - (krand() & 63);
zvel = oldzvel + 512 - (krand() & 1023);
@ -3390,9 +3390,9 @@ void processinput_r(int snum)
psectlotag = 1;
if (psectlotag == 857)
pact->set_native_clipdist(1);
pact->set_const_clipdist(1);
else
pact->set_native_clipdist(64);
pact->set_const_clipdist(64);
p->spritebridge = 0;

View file

@ -628,7 +628,7 @@ void resetpspritevars(int g)
act->spr.yrepeat = isRR() ? 17 : 36;
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.xoffset = 0;
act->set_native_clipdist(64);
act->set_const_clipdist(64);
if (ps[j].last_extra == 0)
{

View file

@ -76,7 +76,7 @@ DDukeActor* CreateActor(sectortype* whatsectp, const DVector3& pos, int s_pn, in
act->spr.xoffset = 0;
act->spr.yoffset = 0;
act->spr.yint = 0;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
act->spr.pal = 0;
act->spr.lotag = 0;
act->backuploc();
@ -270,7 +270,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_native_clipdist(80);
act->set_const_clipdist(80);
if (actj)
{
if (actj->spr.picnum == RESPAWN)
@ -281,7 +281,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
}
else
{
act->set_native_clipdist(40);
act->set_const_clipdist(40);
act->SetOwner(act);
ChangeActorStat(act, STAT_ACTOR);
}
@ -919,8 +919,8 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
{
if (sectp->lotag == SE_30_TWO_WAY_TRAIN)
{
if (actor->spr.pal) actor->set_native_clipdist(1);
else actor->set_native_clipdist(0);
if (actor->spr.pal) actor->set_const_clipdist(1);
else actor->set_const_clipdist(0);
actor->temp_data[3] = sectp->int_floorz();
sectp->hitagactor = actor;
}

View file

@ -62,7 +62,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.pal = actj->spr.pal;
if (act->spr.pal != 0)
{
act->set_native_clipdist(80);
act->set_const_clipdist(80);
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
}
@ -70,14 +70,14 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 80;
act->spr.yrepeat = 80;
act->set_native_clipdist(164);
act->set_const_clipdist(164);
}
}
else
{
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->set_native_clipdist(80);
act->set_const_clipdist(80);
}
if (actj)
@ -417,7 +417,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case PIPE4:
case PIPE5:
case PIPE6:
act->set_native_clipdist(32);
act->set_const_clipdist(32);
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
[[fallthrough]];
case OCEANSPRITE4:
@ -493,12 +493,12 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.picnum == QUEBALL || act->spr.picnum == STRIPEBALL)
{
act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
}
else
{
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(32);
act->set_const_clipdist(32);
}
ChangeActorStat(act, 2);
@ -531,7 +531,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
{
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(128);
act->set_const_clipdist(128);
}
[[fallthrough]];
case MIKE:
@ -834,7 +834,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.pal = actj->spr.pal;
if (act->spr.pal && (!isWorldTour() || !(currentLevel->flags & LEVEL_WT_BOSSSPAWN) || act->spr.pal != 22))
{
act->set_native_clipdist(80);
act->set_const_clipdist(80);
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
}
@ -842,7 +842,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 80;
act->spr.yrepeat = 80;
act->set_native_clipdist(164);
act->set_const_clipdist(164);
}
}
else
@ -851,13 +851,13 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 40;
act->spr.yrepeat = 40;
act->set_native_clipdist(80);
act->set_const_clipdist(80);
}
else
{
act->spr.xrepeat = 60;
act->spr.yrepeat = 60;
act->set_native_clipdist(40);
act->set_const_clipdist(40);
}
}
@ -1170,7 +1170,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case STALL:
act->spr.lotag = 1;
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->SetOwner(act);
break;
case CANWITHSOMETHING:
@ -1191,7 +1191,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (actj)
act->spr.xrepeat = act->spr.yrepeat = 32;
act->set_native_clipdist(72);
act->set_const_clipdist(72);
makeitfall(act);
if (actj) act->SetOwner(actj);
else act->SetOwner(act);
@ -1207,7 +1207,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
if (act->spr.picnum == EGG)
{
act->set_native_clipdist(24);
act->set_const_clipdist(24);
ps[connecthead].max_actors_killed++;
}
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();

View file

@ -57,7 +57,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = 0;
act->spr.yrepeat = 0;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
act->spr.extra = 0;
ChangeActorStat(act, STAT_BOWLING);
break;
@ -77,7 +77,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (!isRRRA()) goto default_case;
act->spr.xrepeat = 16;
act->spr.yrepeat = 16;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
act->spr.extra = 0;
act->spr.cstat = 0;
ChangeActorStat(act, 121);
@ -114,18 +114,18 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE8448:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
break;
case RRTILE8099:
if (!isRRRA()) goto default_case;
act->spr.lotag = 5;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
ChangeActorStat(act, 123);
break;
case RRTILE8704:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
break;
case RRTILE8192:
if (!isRRRA()) goto default_case;
@ -142,7 +142,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE8165:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
act->SetOwner(act);
act->spr.extra = 0;
ChangeActorStat(act, 115);
@ -150,7 +150,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE8593:
if (!isRRRA()) goto default_case;
act->spr.lotag = 1;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
act->SetOwner(act);
act->spr.extra = 0;
ChangeActorStat(act, 122);
@ -168,7 +168,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
act->spr.xrepeat = 0;
act->spr.yrepeat = 0;
act->set_native_clipdist(0);
act->set_const_clipdist(0);
act->spr.lotag = 0;
ChangeActorStat(act, 106);
break;
@ -411,7 +411,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case PIPE4:
case PIPE5:
case PIPE6:
act->set_native_clipdist(32);
act->set_const_clipdist(32);
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
ChangeActorStat(act, 0);
break;
@ -446,25 +446,25 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.picnum == QUEBALL || act->spr.picnum == STRIPEBALL)
{
act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
}
else
{
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(32);
act->set_const_clipdist(32);
}
ChangeActorStat(act, 2);
break;
case BOWLINGBALL:
act->spr.cstat = CSTAT_SPRITE_BLOCK_HITSCAN;
act->set_native_clipdist(64);
act->set_const_clipdist(64);
act->spr.xrepeat = 11;
act->spr.yrepeat = 9;
ChangeActorStat(act, 2);
break;
case HENSTAND:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(48);
act->set_const_clipdist(48);
act->spr.xrepeat = 21;
act->spr.yrepeat = 15;
ChangeActorStat(act, 2);
@ -477,14 +477,14 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE297:
act->spr.xrepeat = 64;
act->spr.yrepeat = 64;
act->set_native_clipdist(64);
act->set_const_clipdist(64);
ChangeActorStat(act, 108);
break;
case RRTILE3190:
case RRTILE3191:
case RRTILE3192:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->spr.xrepeat = 32;
act->spr.yrepeat = 26;
act->vel.X = 2;
@ -492,7 +492,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3120:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->spr.xrepeat = 12;
act->spr.yrepeat = 10;
act->vel.X = 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_native_clipdist(2);
act->set_const_clipdist(2);
act->spr.xrepeat = 8;
act->spr.yrepeat = 6;
act->vel.X = 1;
@ -508,7 +508,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3123:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->spr.xrepeat = 13;
act->spr.yrepeat = 13;
act->vel.X = 1;
@ -516,7 +516,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3124:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->spr.xrepeat = 17;
act->spr.yrepeat = 12;
act->vel.X = 2;
@ -524,7 +524,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case RRTILE3132:
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->spr.xrepeat = 13;
act->spr.yrepeat = 10;
act->vel.X = 0;
@ -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_native_clipdist(48);
act->set_const_clipdist(48);
act->spr.xrepeat = 23;
act->spr.yrepeat = 23;
ChangeActorStat(act, 2);
@ -559,7 +559,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
{
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(128);
act->set_const_clipdist(128);
}
[[fallthrough]];
case MIKE:
@ -847,7 +847,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case DRONE:
act->spr.xrepeat = 14;
act->spr.yrepeat = 7;
act->set_native_clipdist(128);
act->set_const_clipdist(128);
break;
case SBSWIPE:
case BILLYPLAY:
@ -878,7 +878,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 21;
act->spr.yrepeat = 15;
act->set_native_clipdist(64);
act->set_const_clipdist(64);
}
break;
case MINION:
@ -912,36 +912,36 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{
act->spr.xrepeat = 26;
act->spr.yrepeat = 26;
act->set_native_clipdist(75);
act->set_const_clipdist(75);
}
else if (act->spr.pal == 31)
{
act->spr.xrepeat = 36;
act->spr.yrepeat = 36;
act->set_native_clipdist(100);
act->set_const_clipdist(100);
}
else if (act->spr.pal == 32)
{
act->spr.xrepeat = 50;
act->spr.yrepeat = 50;
act->set_native_clipdist(100);
act->set_const_clipdist(100);
}
else
{
act->spr.xrepeat = 50;
act->spr.yrepeat = 50;
act->set_native_clipdist(100);
act->set_const_clipdist(100);
}
break;
case BIKERB:
act->spr.xrepeat = 28;
act->spr.yrepeat = 22;
act->set_native_clipdist(72);
act->set_const_clipdist(72);
break;
case BIKERBV2:
act->spr.xrepeat = 28;
act->spr.yrepeat = 22;
act->set_native_clipdist(72);
act->set_const_clipdist(72);
break;
case BIKER:
act->spr.xrepeat = 28;
@ -951,7 +951,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case CHEERB:
act->spr.xrepeat = 28;
act->spr.yrepeat = 22;
act->set_native_clipdist(72);
act->set_const_clipdist(72);
break;
case CHEER:
case CHEERSTAYPUT:
@ -1443,7 +1443,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case RRTILE2122:
act->spr.lotag = 1;
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->set_native_clipdist(8);
act->set_const_clipdist(8);
act->SetOwner(act);
break;
case CANWITHSOMETHING:
@ -1461,7 +1461,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (actj)
act->spr.xrepeat = act->spr.yrepeat = 32;
act->set_native_clipdist(72);
act->set_const_clipdist(72);
makeitfall(act);
if (actj) act->SetOwner(actj);
else act->SetOwner(act);
@ -1476,7 +1476,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else
{
if (act->spr.picnum == EGG)
act->set_native_clipdist(24);
act->set_const_clipdist(24);
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_native_clipdist(1);
act->set_const_clipdist(1);
ChangeActorStat(act, 100);
break;
}

View file

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

View file

@ -64,7 +64,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_native_clipdist(60);
ap->set_const_clipdist(60);
ap->spr.angle = nAngle;
ap->spr.xrepeat = 40;
ap->spr.yrepeat = 40;

View file

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

View file

@ -601,7 +601,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, DAngl
pBulletActor->spr.pal = 0;
}
pBulletActor->set_native_clipdist(25);
pBulletActor->set_const_clipdist(25);
int nRepeat = pBulletInfo->xyRepeat;
if (nRepeat < 0) {

View file

@ -63,7 +63,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
pChunkActor->spr.picnum = anim;
pChunkActor->spr.lotag = runlist_HeadRun() + 1;
pChunkActor->set_native_clipdist(0);
pChunkActor->set_const_clipdist(0);
// GrabTimeSlot(3);
@ -153,7 +153,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->spr.shade = -12;
pActor->set_native_clipdist(80);
pActor->set_const_clipdist(80);
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;
pActor->spr.pal = pActor->sector()->ceilingpal;

View file

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

View file

@ -55,7 +55,7 @@ DExhumedActor* BuildLavaLimb(DExhumedActor* pActor, int move, int ebx)
pLimbActor->spr.picnum = (move & 3) % 3;
pLimbActor->spr.hitag = 0;
pLimbActor->spr.lotag = runlist_HeadRun() + 1;
pLimbActor->set_native_clipdist(0);
pLimbActor->set_const_clipdist(0);
// GrabTimeSlot(3);
@ -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_native_clipdist(127);
pActor->set_const_clipdist(127);
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_native_clipdist(60);
pActor->set_const_clipdist(60);
pActor->spr.shade = -12;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;

View file

@ -1312,7 +1312,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_native_clipdist(40);
pActor->set_const_clipdist(40);
// GrabTimeSlot(3);

View file

@ -52,7 +52,7 @@ void BuildMummy(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->spr.shade = -12;
pActor->set_native_clipdist(32);
pActor->set_const_clipdist(32);
pActor->vel.X = 0;
pActor->vel.Y = 0;
pActor->vel.Z = 0;

View file

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

View file

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

View file

@ -393,7 +393,7 @@ void BuildTail()
pTailActor->spr.shade = -12;
pTailActor->spr.hitag = 0;
pTailActor->spr.cstat = 0;
pTailActor->set_native_clipdist(100);
pTailActor->set_const_clipdist(100);
pTailActor->spr.xrepeat = 80;
pTailActor->spr.yrepeat = 80;
pTailActor->spr.picnum = 1;
@ -432,7 +432,7 @@ void BuildQueenEgg(int nQueen, int nVal)
pActor2->spr.pos = DVector3(pActor->spr.pos.XY(), pSector->floorz);
pActor2->spr.pal = 0;
pActor2->set_native_clipdist(50);
pActor2->set_const_clipdist(50);
pActor2->spr.xoffset = 0;
pActor2->spr.yoffset = 0;
pActor2->spr.shade = -12;
@ -686,7 +686,7 @@ void BuildQueenHead(int nQueen)
pActor2->spr.pos.XY() = pActor->spr.pos.XY();
pActor2->spr.pos.Z = pSector->floorz;
pActor2->set_native_clipdist(70);
pActor2->set_const_clipdist(70);
pActor2->spr.xrepeat = 80;
pActor2->spr.yrepeat = 80;
pActor2->spr.cstat = 0;
@ -1090,7 +1090,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_native_clipdist(100);
pActor->set_const_clipdist(100);
pActor->spr.xrepeat = 80;
pActor->spr.yrepeat = 80;
pActor->spr.xoffset = 0;

View file

@ -92,7 +92,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_native_clipdist(30);
pActor->set_const_clipdist(30);
pActor->spr.angle = nAngle;
pActor->spr.xrepeat = 50;
pActor->spr.yrepeat = 50;

View file

@ -52,7 +52,7 @@ void BuildRex(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, D
}
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
pActor->set_native_clipdist(80);
pActor->set_const_clipdist(80);
pActor->spr.shade = -12;
pActor->spr.xrepeat = 64;
pActor->spr.yrepeat = 64;

View file

@ -55,7 +55,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_native_clipdist(60);
pActor->set_const_clipdist(60);
pActor->spr.angle = angle;
pActor->spr.xrepeat = 40;
pActor->spr.yrepeat = 40;

View file

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

View file

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

View file

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

View file

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

View file

@ -56,7 +56,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_native_clipdist(70);
pActor->set_const_clipdist(70);
if (bEggWasp)
{

View file

@ -304,7 +304,7 @@ void DoDebrisCurrent(DSWActor* actor)
int nx, ny;
auto sectp = actor->sector();
//actor->set_native_clipdist((256+128)>>2;
//actor->set_const_clipdist((256+128)>>2;
double spd = sectp->speed / 64.0;
auto vect = sectp->angle.ToVector() * spd;
@ -473,7 +473,7 @@ int DoActorDebris(DSWActor* actor)
int DoFireFly(DSWActor* actor)
{
actor->set_native_clipdist(256>>2);
actor->set_const_clipdist(256>>2);
if (!move_actor(actor, DVector3(actor->spr.angle.ToVector() * (0.25 * ACTORMOVETICS), 0)))
{
actor->spr.angle += DAngle180;
@ -850,7 +850,7 @@ int DoActorDeathMove(DSWActor* actor)
DoActorFall(actor);
}
actor->set_native_clipdist((128+64)>>2);
actor->set_const_clipdist((128+64)>>2);
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_native_clipdist((150) >> 2);
actor->set_const_clipdist((150) >> 2);
if (actor->spr.pal == PALETTE_PLAYER1)
{
@ -755,7 +755,7 @@ int SetupBunny(DSWActor* actor)
actor->spr.xrepeat = 96;
actor->spr.yrepeat = 90;
actor->set_native_clipdist(200>>2);
actor->set_const_clipdist(200>>2);
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_native_clipdist((200) >> 2);
actor->set_const_clipdist((200) >> 2);
actor->user.floor_dist = (16);
actor->user.ceiling_dist = (20);

View file

@ -410,7 +410,7 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SET* action, PERSONALITY* perso
actor->user.spal = actor->spr.pal;
actor->user.RotNum = 5;
actor->set_native_clipdist(256 >> 2);
actor->set_const_clipdist(256 >> 2);
actor->user.zclip = 48;
actor->user.lo_step = 32;

View file

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

View file

@ -505,7 +505,7 @@ int SetupGoro(DSWActor* actor)
EnemyDefaults(actor, &GoroActionSet, &GoroPersonality);
actor->set_native_clipdist(512 >> 2);
actor->set_const_clipdist(512 >> 2);
actor->user.Flags |= (SPR_XFLIP_TOGGLE);
return 0;

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_native_clipdist((100) >> 2);
actor->set_const_clipdist((100) >> 2);
actor->user.floor_dist = (16);
actor->user.ceiling_dist = (16);

View file

@ -1292,13 +1292,13 @@ int PlayerInitChemBomb(PLAYER* pp)
actorNew->vel.Z -= pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
oclipdist = plActor->spr.clipdist;
plActor->set_native_clipdist(0);
actorNew->set_native_clipdist(0);
plActor->set_const_clipdist(0);
actorNew->set_const_clipdist(0);
MissileSetPos(actorNew, DoChemBomb, 1000);
plActor->spr.clipdist = uint8_t(oclipdist);
actorNew->set_native_clipdist(80 >> 2);
plActor->spr.clipdist = oclipdist;
actorNew->set_const_clipdist(80 >> 2);
UpdateChange(actorNew, 0.5);
@ -1342,7 +1342,7 @@ int InitSpriteChemBomb(DSWActor* actor)
actorNew->vel.Z = (-100 - RandomRange(100)) * HORIZ_MULTF;
actorNew->set_native_clipdist(80 >> 2);
actorNew->set_const_clipdist(80 >> 2);
UpdateChange(actorNew, 0.5);
@ -1382,7 +1382,7 @@ int InitChemBomb(DSWActor* actor)
actorNew->user.Flags |= (SPR_UNDERWATER);
actorNew->vel.Z = (-100 - RandomRange(100)) * HORIZ_MULTF;
actorNew->set_native_clipdist(0);
actorNew->set_const_clipdist(0);
if (actor->user.ID == MUSHROOM_CLOUD || actor->user.ID == 3121 || actor->user.ID == SUMO_RUN_R0) // 3121 == GRENADE_EXP
{
@ -1656,13 +1656,13 @@ int PlayerInitCaltrops(PLAYER* pp)
actorNew->vel.Z -= pp->horizon.horiz.asbuildf() * 0.5;
oclipdist = plActor->spr.clipdist;
plActor->set_native_clipdist(0);
actorNew->set_native_clipdist(0);
plActor->set_const_clipdist(0);
actorNew->set_const_clipdist(0);
MissileSetPos(actorNew, DoCaltrops, 1000);
plActor->spr.clipdist = uint8_t(oclipdist);
actorNew->set_native_clipdist(80 >> 2);
plActor->spr.clipdist = oclipdist;
actorNew->set_const_clipdist(80 >> 2);
UpdateChange(actorNew, 0.5);

View file

@ -475,7 +475,7 @@ int SetupLava(DSWActor* actor)
EnemyDefaults(actor, &LavaActionSet, &LavaPersonality);
actor->spr.xrepeat = actor->spr.yrepeat = 110;
actor->set_native_clipdist((512) >> 2);
actor->set_const_clipdist((512) >> 2);
actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT);
actor->user.loz = actor->spr.pos.Z;

View file

@ -2417,7 +2417,7 @@ void InitPlayerSprite(PLAYER* pp)
actor->spr.picnum = actor->user.State->Pic;
actor->spr.shade = -60; // was 15
actor->set_native_clipdist(256 >> 2);
actor->set_const_clipdist(256 >> 2);
actor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
actor->spr.yrepeat = PLAYER_NINJA_YREPEAT;

View file

@ -903,7 +903,7 @@ int SetupRipper2(DSWActor* actor)
DoActorSetSpeed(actor, NORM_SPEED);
actor->user.StateEnd = s_Ripper2Die;
actor->user.Rot = sg_Ripper2Run;
actor->set_native_clipdist(512 >> 2); // This actor is bigger, needs bigger box.
actor->set_const_clipdist(512 >> 2); // This actor is bigger, needs bigger box.
actor->spr.xrepeat = actor->spr.yrepeat = 55;
if (actor->spr.pal == PALETTE_BROWN_RIPPER)

View file

@ -727,7 +727,7 @@ int SetupSerp(DSWActor* actor)
actor->spr.xrepeat = 128;
}
actor->set_native_clipdist((512) >> 2);
actor->set_const_clipdist((512) >> 2);
actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT);
actor->user.loz = actor->spr.pos.Z;

View file

@ -525,7 +525,7 @@ int SetupSkel(DSWActor* actor)
EnemyDefaults(actor, &SkelActionSet, &SkelPersonality);
// 256 is default
//actor->set_native_clipdist(256 >> 2);
//actor->set_const_clipdist(256 >> 2);
actor->user.Flags |= (SPR_XFLIP_TOGGLE);
return 0;

View file

@ -232,7 +232,7 @@ int SetupSkull(DSWActor* actor)
actor->user.ID = SKULL_R0;
EnemyDefaults(actor, nullptr, nullptr);
actor->set_native_clipdist((128+64) >> 2);
actor->set_const_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->set_native_clipdist((128+64) >> 2);
actor->set_const_clipdist((128+64) >> 2);
actor->user.Flags |= (SPR_XFLIP_TOGGLE);
actor->spr.cstat |= (CSTAT_SPRITE_YCENTER);

View file

@ -624,7 +624,7 @@ int SetupSumo(DSWActor* actor)
EnemyDefaults(actor, &SumoActionSet, &SumoPersonality);
actor->set_native_clipdist((512) >> 2);
actor->set_const_clipdist((512) >> 2);
if (actor->spr.pal == 16)
{
// Mini Sumo

View file

@ -3758,7 +3758,7 @@ AutoShrap:
actor->spr.shade = int8_t(shrap_shade);
actor->spr.xrepeat = uint8_t(shrap_xsize);
actor->spr.yrepeat = uint8_t(shrap_ysize);
actor->set_native_clipdist(16 >> 2);
actor->set_const_clipdist(16 >> 2);
if (ShrapOwner != nullptr)
{
@ -4162,7 +4162,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, DAngle hit_angle, const DVe
actorNew->spr.shade = int8_t(shrap_shade);
actorNew->spr.xrepeat = uint8_t(shrap_xsize);
actorNew->spr.yrepeat = uint8_t(shrap_ysize);
actorNew->set_native_clipdist(16 >> 2);
actorNew->set_const_clipdist(16 >> 2);
actorNew->spr.pal = actorNew->user.spal = uint8_t(shrap_pal);
@ -7649,7 +7649,7 @@ int DoStar(DSWActor* actor)
actor->spr.xrepeat -= 16;
actor->spr.yrepeat -= 16;
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actor->set_native_clipdist(16L >> 2);
actor->set_const_clipdist(16 >> 2);
actor->user.ceiling_dist = (2);
actor->user.floor_dist = (2);
// treat this just like a KillSprite but don't kill
@ -8114,7 +8114,7 @@ int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor)
SetOwner(GetOwner(wActor), actorNew);
SetAttach(sActor, actorNew);
actorNew->spr.yrepeat = 0;
actorNew->set_native_clipdist(8>>2);
actorNew->set_const_clipdist(8>>2);
actorNew->user.WaitTics = 120+60;
actorNew->user.Radius = 50;
@ -9783,7 +9783,7 @@ int DoUziBullet(DSWActor* actor)
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
SetOwner(GetOwner(actor), actorNew);
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(128 >> 2);
actorNew->set_const_clipdist(128 >> 2);
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
if (!(actor->user.Flags & SPR_UNDERWATER))
@ -11441,7 +11441,7 @@ int DoMirv(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->vel.Z = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -11863,7 +11863,7 @@ int InitLavaThrow(DSWActor* actor)
actorNew->user.Radius = 200;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(256>>2);
actorNew->set_const_clipdist(256>>2);
actorNew->user.ceiling_dist = (14);
actorNew->user.floor_dist = (14);
@ -11918,7 +11918,7 @@ void InitVulcanBoulder(DSWActor* actor)
actorNew->user.Radius = 200;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(256>>2);
actorNew->set_const_clipdist(256>>2);
actorNew->user.ceiling_dist = zsize/2;
actorNew->user.floor_dist = zsize/2;
if (RANDOM_P2(1024) > 512)
@ -12006,7 +12006,7 @@ int InitSerpRing(DSWActor* actor)
change_actor_stat(actorNew, STAT_SKIP4);
actorNew->spr.extra &= ~(SPRX_PLAYER_OR_ENEMY);
actorNew->set_native_clipdist((128+64) >> 2);
actorNew->set_const_clipdist((128+64) >> 2);
actorNew->user.Flags |= (SPR_XFLIP_TOGGLE);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -12062,7 +12062,7 @@ void InitSpellNapalm(PLAYER* pp)
actor->spr.shade = -40;
actor->spr.xrepeat = 32;
actor->spr.yrepeat = 32;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actor->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
@ -12073,7 +12073,7 @@ void InitSpellNapalm(PLAYER* pp)
actor->user.Dist = 12.5;
auto oclipdist = plActor->spr.clipdist;
plActor->set_native_clipdist(1);
plActor->set_const_clipdist(1);
if (mp[i].dist_over != 0)
{
@ -12139,7 +12139,7 @@ int InitEnemyNapalm(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 32;
actorNew->spr.yrepeat = 32;
actorNew->set_native_clipdist(0);
actorNew->set_const_clipdist(0);
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
@ -12149,7 +12149,7 @@ int InitEnemyNapalm(DSWActor* actor)
actorNew->user.Dist = 12.5;
SAVE_CLIP;
actor->set_native_clipdist(1);
actor->set_const_clipdist(1);
if (mp[i].dist_over != 0)
{
@ -12194,7 +12194,7 @@ int InitSpellMirv(PLAYER* pp)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 72;
actorNew->spr.yrepeat = 72;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
@ -12205,7 +12205,7 @@ int InitSpellMirv(PLAYER* pp)
DSWActor* plActor = pp->actor;
auto oclipdist = plActor->spr.clipdist;
plActor->set_native_clipdist(0);
plActor->set_const_clipdist(0);
UpdateChange(actorNew);
@ -12235,7 +12235,7 @@ int InitEnemyMirv(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 72;
actorNew->spr.yrepeat = 72;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
@ -12653,7 +12653,7 @@ int InitSumoNapalm(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 32;
actorNew->spr.yrepeat = 32;
actorNew->set_native_clipdist(0);
actorNew->set_const_clipdist(0);
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
@ -12663,7 +12663,7 @@ int InitSumoNapalm(DSWActor* actor)
actorNew->user.Dist = 12.5;
SAVE_CLIP;
actor->set_native_clipdist(1);
actor->set_const_clipdist(1);
if (mp[i].dist_over != 0)
{
@ -12732,7 +12732,7 @@ int InitSumoSkull(DSWActor* actor)
EnemyDefaults(actorNew, nullptr, nullptr);
actorNew->spr.extra |= SPRX_PLAYER_OR_ENEMY;
actorNew->set_native_clipdist((128+64) >> 2);
actorNew->set_const_clipdist((128+64) >> 2);
actorNew->user.Flags |= (SPR_XFLIP_TOGGLE);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -13067,7 +13067,7 @@ int InitStar(PLAYER* pp)
SetOwner(pp->actor, actorNew);
actorNew->spr.yrepeat = actorNew->spr.xrepeat = STAR_REPEAT;
actorNew->spr.shade = -25;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
// zvel was overflowing with this calculation - had to move to a local long var
double zvel = -pp->horizon.horiz.asbuildf() * ((HORIZ_MULT + STAR_HORIZ_ADJ) / 256.);
@ -13169,7 +13169,7 @@ void InitHeartAttack(PLAYER* pp)
actorNew->spr.shade = -10;
actorNew->spr.xrepeat = 52;
actorNew->spr.yrepeat = 52;
actorNew->set_native_clipdist(0);
actorNew->set_const_clipdist(0);
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
@ -13180,7 +13180,7 @@ void InitHeartAttack(PLAYER* pp)
actorNew->user.Dist = 12.5;
auto oclipdist = plActor->spr.clipdist;
plActor->set_native_clipdist(1);
plActor->set_const_clipdist(1);
UpdateChange(actorNew);
@ -13474,7 +13474,7 @@ int InitLaser(PLAYER* pp)
actorNew->spr.yrepeat = 52;
actorNew->spr.xrepeat = 52;
actorNew->spr.shade = -15;
actorNew->set_native_clipdist(64 >> 2);;
actorNew->set_const_clipdist(64 >> 2);;
// the slower the missile travels the less of a zvel it needs
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF * 0.25;
@ -13489,7 +13489,7 @@ int InitLaser(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning of the fireball.
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 900);
@ -13588,8 +13588,8 @@ int InitRail(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning
SAVE_CLIP;
actor->set_native_clipdist(0);
actorNew->set_native_clipdist(32 >> 2);
actor->set_const_clipdist(0);
actorNew->set_const_clipdist(32 >> 2);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 700);
@ -13662,8 +13662,8 @@ int InitZillaRail(DSWActor* actor)
// at certain angles the clipping box was big enough to block the
// initial positioning
SAVE_CLIP;
actor->set_native_clipdist(0);
actorNew->set_native_clipdist(32 >> 2);
actor->set_const_clipdist(0);
actorNew->set_const_clipdist(32 >> 2);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 700);
@ -13741,7 +13741,7 @@ int InitRocket(PLAYER* pp)
actorNew->spr.shade = -15;
zvel = -pp->horizon.horiz.asbuildf() * ((HORIZ_MULT + 35) / 256.);
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_Rocket[0]);
@ -13770,7 +13770,7 @@ int InitRocket(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning of the fireball.
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 900);
@ -13849,7 +13849,7 @@ int InitBunnyRocket(PLAYER* pp)
actorNew->spr.shade = -15;
zvel = -pp->horizon.horiz.asbuildf() * ((HORIZ_MULT + 35) / 256.);
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_BunnyRocket[0]);
@ -13875,7 +13875,7 @@ int InitBunnyRocket(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning of the fireball.
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 900);
@ -13951,7 +13951,7 @@ int InitNuke(PLAYER* pp)
actorNew->spr.xrepeat = 128;
actorNew->spr.shade = -15;
zvel = -pp->horizon.horiz.asbuildf() * ((HORIZ_MULT + 36) / 256.);
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
// Set to red palette
actorNew->spr.pal = actorNew->user.spal = 19;
@ -13969,7 +13969,7 @@ int InitNuke(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning of the fireball.
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 900);
@ -14034,7 +14034,7 @@ int InitEnemyNuke(DSWActor* actor)
actorNew->spr.xrepeat = 128;
actorNew->spr.shade = -15;
double zvel = (100 * (HORIZ_MULT-36)) / 256.; // Ugh...
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
// Set to red palette
actorNew->spr.pal = actorNew->user.spal = 19;
@ -14134,7 +14134,7 @@ int InitMicro(PLAYER* pp)
actorNew->spr.xrepeat = 24;
actorNew->spr.shade = -15;
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
// randomize zvelocity
actorNew->vel.Z += RandomRangeF(8) - 5;
@ -14155,7 +14155,7 @@ int InitMicro(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning of the fireball.
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
const int MICRO_LATERAL = 5000;
@ -14555,7 +14555,7 @@ int InitSerpSpell(DSWActor* actor)
actorNew->user.spal = actorNew->spr.pal = 27; // Bright Green
actorNew->spr.xrepeat = 64;
actorNew->spr.yrepeat = 64;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->vel.Z = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -14564,7 +14564,7 @@ int InitSerpSpell(DSWActor* actor)
actorNew->user.Dist = 12.5;
SAVE_CLIP;
actor->set_native_clipdist(1);
actor->set_const_clipdist(1);
actorNew->spr.angle += lat_ang[i];
HelpMissileLateral(actorNew, 4200);
@ -14658,7 +14658,7 @@ int InitSerpMonstSpell(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 122;
actorNew->spr.yrepeat = 116;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->vel.Z = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -14668,7 +14668,7 @@ int InitSerpMonstSpell(DSWActor* actor)
actorNew->user.Dist = 12.5;
SAVE_CLIP;
actor->set_native_clipdist(1);
actor->set_const_clipdist(1);
actorNew->spr.angle += lat_ang[i];
HelpMissileLateral(actorNew, 4200);
@ -14739,7 +14739,7 @@ int InitEnemyRocket(DSWActor* actor)
actorNew->spr.shade = -15;
actorNew->vel.Z = 0;
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_Rocket[0]);
@ -14824,7 +14824,7 @@ int InitEnemyRail(DSWActor* actor)
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE);
actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
UpdateChange(actorNew);
@ -14879,7 +14879,7 @@ int InitZillaRocket(DSWActor* actor)
actorNew->spr.shade = -15;
actorNew->vel.Z = 0;
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_Rocket[0]);
@ -14936,7 +14936,7 @@ int InitEnemyStar(DSWActor* actor)
actorNew->spr.shade = -25;
actorNew->vel.Z = 0;
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
UpdateChange(actorNew);
@ -14972,7 +14972,7 @@ int InitEnemyCrossbow(DSWActor* actor)
actorNew->spr.shade = -25;
actorNew->vel.Z = 0;
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_CrossBolt[0]);
@ -15015,7 +15015,7 @@ int InitSkelSpell(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
// find the distance to the target (player)
@ -15053,7 +15053,7 @@ int InitCoolgFire(DSWActor* actor)
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->spr.angle = actor->spr.angle;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.ceiling_dist = (4);
actorNew->user.floor_dist = (4);
if (actor->user.ID == RIPPER_RUN_R0)
@ -15112,7 +15112,7 @@ int InitCoolgDrip(DSWActor* actor)
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 20;
actorNew->spr.shade = -5;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(16 >> 2);
actorNew->set_const_clipdist(16 >> 2);
actorNew->user.ceiling_dist = (4);
actorNew->user.floor_dist = (4);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -15151,7 +15151,7 @@ int GenerateDrips(DSWActor* actor)
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 20;
actorNew->spr.shade = -10;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(16 >> 2);
actorNew->set_const_clipdist(16 >> 2);
actorNew->user.ceiling_dist = (4);
actorNew->user.floor_dist = (4);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -15222,7 +15222,7 @@ void InitFireballTrap(DSWActor* actor)
actorNew->spr.xrepeat -= 20;
actorNew->spr.yrepeat -= 20;
actorNew->spr.shade = -40;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->vel.Z = 0;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.WeaponNum = WPN_HOTHEAD;
@ -15275,7 +15275,7 @@ void InitSpearTrap(DSWActor* actor)
actorNew->spr.xrepeat = 16;
actorNew->spr.yrepeat = 26;
actorNew->spr.shade = -25;
actorNew->set_native_clipdist(64 >> 2);;
actorNew->set_const_clipdist(64 >> 2);;
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_CrossBolt[0]);
@ -15334,7 +15334,7 @@ int InitTracerUzi(PLAYER* pp)
actorNew->spr.xrepeat = 10;
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 50;
@ -15345,7 +15345,7 @@ int InitTracerUzi(PLAYER* pp)
DSWActor* plActor = pp->actor;
auto oclipdist = plActor->spr.clipdist;
plActor->set_native_clipdist(0);
plActor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
if (pp->Flags & (PF_TWO_UZI) && pp->WpnUziType == 0)
@ -15399,7 +15399,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixedhoriz horiz)
actorNew->spr.xrepeat = 10;
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(8 >> 2);
actorNew->set_const_clipdist(8 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 50;
@ -15441,7 +15441,7 @@ int InitTracerAutoTurret(DSWActor* actor, const DVector3& change)
actorNew->spr.xrepeat = 10;
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(8 >> 2);
actorNew->set_const_clipdist(8 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 50;
@ -15748,7 +15748,7 @@ int InitUzi(PLAYER* pp)
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
SetOwner(pp->actor, actorNew);
actorNew->spr.cstat |= (cstat | CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(8 >> 2);
actorNew->set_const_clipdist(8 >> 2);
HitscanSpriteAdjust(actorNew, hit.hitWall);
DoHitscanDamage(actorNew, hit.actor());
@ -15761,7 +15761,7 @@ int InitUzi(PLAYER* pp)
SetOwner(pp->actor, actorNew);
actorNew->user.spal = actorNew->spr.pal = pal;
actorNew->spr.cstat |= (cstat | CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(8 >> 2);
actorNew->set_const_clipdist(8 >> 2);
HitscanSpriteAdjust(actorNew, hit.hitWall);
@ -15794,7 +15794,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
actorNew->spr.xrepeat = 8;
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 50;
@ -15874,7 +15874,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
actorNew->spr.xrepeat = 24;
actorNew->spr.shade = -15;
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF + RandomRangeF(8) - 5;
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
actorNew->user.RotNum = 5;
@ -15934,7 +15934,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
actorNew->spr.xrepeat = 40;
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 50;
@ -15974,7 +15974,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
actorNew->spr.xrepeat = 40;
actorNew->spr.shade = -40;
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 50;
@ -16033,7 +16033,7 @@ int InitTurretRail(DSWActor* actor, PLAYER* pp)
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE);
actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
if (WeaponAutoAim(pp->actor, actorNew, DAngle22_5 / 4, false) == -1)
{
@ -16077,7 +16077,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp)
actorNew->user.Flags2 |= (SPR2_SO_MISSILE);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->set_native_clipdist(64 >> 2);
actorNew->set_const_clipdist(64 >> 2);
if (WeaponAutoAim(actor, actorNew, DAngle22_5 / 4, false) == -1)
{
@ -16311,7 +16311,7 @@ DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall,
// Sprite starts out with center exactly on wall.
// This moves it back enough to see it at all angles.
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
HitscanSpriteAdjust(actorNew, hit_wall);
@ -16324,7 +16324,7 @@ DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall,
actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
HitscanSpriteAdjust(actorNew, hit_wall);
@ -16354,7 +16354,7 @@ int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const
// Sprite starts out with center exactly on wall.
// This moves it back enough to see it at all angles.
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
if (hit_wall != nullptr)
HitscanSpriteAdjust(actorNew, hit_wall);
@ -16368,7 +16368,7 @@ int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const
if (actor->user.WeaponNum == WPN_FIST)
actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
if (hit_wall != nullptr)
HitscanSpriteAdjust(actorNew, hit_wall);
@ -16394,7 +16394,7 @@ DSWActor* SpawnTurretSparks(sectortype* hit_sect, walltype* hit_wall, const DVec
// Sprite starts out with center exactly on wall.
// This moves it back enough to see it at all angles.
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
HitscanSpriteAdjust(actorNew, hit_wall);
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit_sect, hitpos, hit_ang, 0);
@ -16405,7 +16405,7 @@ DSWActor* SpawnTurretSparks(sectortype* hit_sect, walltype* hit_wall, const DVec
actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
HitscanSpriteAdjust(actorNew, hit_wall);
if (RANDOM_P2(1024) < 100)
@ -16431,7 +16431,7 @@ DSWActor* SpawnShotgunSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wal
actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
HitscanSpriteAdjust(actorNew, hit_wall);
@ -16445,7 +16445,7 @@ DSWActor* SpawnShotgunSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wal
// Sprite starts out with center exactly on wall.
// This moves it back enough to see it at all angles.
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
HitscanSpriteAdjust(actorNew, hit_wall);
@ -16722,7 +16722,7 @@ int InitEnemyUzi(DSWActor* actor)
actorNew->user.WaitTics = 63;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos, daang, 0);
actorNew->spr.shade = -40;
@ -16730,7 +16730,7 @@ int InitEnemyUzi(DSWActor* actor)
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
SetOwner(actor, actorNew);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(8 >> 2);
actorNew->set_const_clipdist(8 >> 2);
HitscanSpriteAdjust(actorNew, hit.hitWall);
DoHitscanDamage(actorNew, hit.actor());
@ -16743,7 +16743,7 @@ int InitEnemyUzi(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->user.spal = actorNew->spr.pal;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->set_native_clipdist(8 >> 2);
actorNew->set_const_clipdist(8 >> 2);
HitscanSpriteAdjust(actorNew, hit.hitWall);
@ -16803,8 +16803,8 @@ int InitGrenade(PLAYER* pp)
actorNew->spr.yrepeat = 32;
actorNew->spr.xrepeat = 32;
actorNew->spr.shade = -15;
//actorNew->set_native_clipdist(80 >> 2);
actorNew->set_native_clipdist(32 >> 2);
//actorNew->set_const_clipdist(80 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 200;
actorNew->user.ceiling_dist = (3);
@ -16819,7 +16819,7 @@ int InitGrenade(PLAYER* pp)
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 800);
@ -16878,8 +16878,8 @@ int InitSpriteGrenade(DSWActor* actor)
actorNew->spr.yrepeat = 32;
actorNew->spr.xrepeat = 32;
actorNew->spr.shade = -15;
//actorNew->set_native_clipdist(80 >> 2);
actorNew->set_native_clipdist(32 >> 2);
//actorNew->set_const_clipdist(80 >> 2);
actorNew->set_const_clipdist(32 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 200;
actorNew->user.ceiling_dist = (3);
@ -16933,7 +16933,7 @@ int InitMine(PLAYER* pp)
actorNew->spr.yrepeat = 32;
actorNew->spr.xrepeat = 32;
actorNew->spr.shade = -15;
actorNew->set_native_clipdist(128 >> 2);
actorNew->set_const_clipdist(128 >> 2);
actorNew->vel.Z = -pp->horizon.horiz.asbuildf() * HORIZ_MULTF;
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 200;
@ -16982,7 +16982,7 @@ int InitEnemyMine(DSWActor* actor)
actorNew->spr.yrepeat = 32;
actorNew->spr.xrepeat = 32;
actorNew->spr.shade = -15;
actorNew->set_native_clipdist(128 >> 2);
actorNew->set_const_clipdist(128 >> 2);
actorNew->user.WeaponNum = actor->user.WeaponNum;
actorNew->user.Radius = 200;
@ -17022,7 +17022,7 @@ int HelpMissileLateral(DSWActor* actor, int dist)
auto vec = actor->spr.angle.ToVector() * actor->vel.X;
actor->set_native_clipdist(32 >> 2);
actor->set_const_clipdist(32 >> 2);
actor->user.coll = move_missile(actor, DVector3(vec, 0), 16, 16, 0, 1);
@ -17062,7 +17062,7 @@ int InitFireball(PLAYER* pp)
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.shade = -40;
actorNew->set_native_clipdist(32 >> 2);
actorNew->set_const_clipdist(32 >> 2);
SetOwner(pp->actor, actorNew);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.Radius = 100;
@ -17074,7 +17074,7 @@ int InitFireball(PLAYER* pp)
// at certain angles the clipping box was big enough to block the
// initial positioning of the fireball.
SAVE_CLIP;
actor->set_native_clipdist(0);
actor->set_const_clipdist(0);
actorNew->spr.angle += DAngle90;
HelpMissileLateral(actorNew, 2100);
@ -17143,7 +17143,7 @@ int InitEnemyFireball(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->vel.Z = 0;
actorNew->set_native_clipdist(16>>2);
actorNew->set_const_clipdist(16>>2);
actorNew->spr.angle += lat_ang[i];
HelpMissileLateral(actorNew, 500);
@ -17619,7 +17619,7 @@ DSWActor* SpawnBubble(DSWActor* actor)
actorNew->spr.shade = actor->sector()->floorshade - 10;
actorNew->user.WaitTics = 120 * 120;
actorNew->vel.Z = 2;
actorNew->set_native_clipdist(12 >> 2);
actorNew->set_const_clipdist(12 >> 2);
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.Flags |= (SPR_UNDERWATER);
actorNew->spr.shade = -60; // Make em brighter
@ -17956,7 +17956,7 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, const DVector3& pos)
spawnedActor->spr.pal = 0;
spawnedActor->spr.shade = 0;
spawnedActor->spr.extra = 0;
spawnedActor->set_native_clipdist(0);
spawnedActor->set_const_clipdist(0);
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->spr.pos = pos;
spawnedActor->spr.picnum = 2151;
@ -18043,7 +18043,7 @@ int QueueFloorBlood(DSWActor* actor)
spawnedActor->spr.pal = 0;
spawnedActor->spr.shade = 0;
spawnedActor->spr.extra = 0;
spawnedActor->set_native_clipdist(0);
spawnedActor->set_const_clipdist(0);
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->spr.pos = actor->spr.pos.plusZ(1);
spawnedActor->spr.angle = RandomAngle(); // Just make it any old angle
@ -18155,7 +18155,7 @@ int QueueFootPrint(DSWActor* actor)
spawnedActor->spr.pal = 0;
spawnedActor->spr.shade = 0;
spawnedActor->spr.extra = 0;
spawnedActor->set_native_clipdist(0);
spawnedActor->set_const_clipdist(0);
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->spr.pos = actor->spr.pos;
spawnedActor->spr.angle = actor->spr.angle;
@ -18296,7 +18296,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, DAngle bang)
spawnedActor->spr.pal = 0;
spawnedActor->spr.shade = 0;
spawnedActor->spr.extra = 0;
spawnedActor->set_native_clipdist(0);
spawnedActor->set_const_clipdist(0);
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
spawnedActor->spr.pos = hit.hitpos;
spawnedActor->spr.shade -= 5; // Brighten it up just a bit

View file

@ -630,7 +630,7 @@ int SetupZilla(DSWActor* actor)
EnemyDefaults(actor, &ZillaActionSet, &ZillaPersonality);
actor->set_native_clipdist((512) >> 2);
actor->set_const_clipdist((512) >> 2);
actor->spr.xrepeat = 97;
actor->spr.yrepeat = 79;