mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- wrapped all literal assignments to clipdist - part 2
This commit is contained in:
parent
28a3a8e314
commit
a14c37f596
5 changed files with 32 additions and 32 deletions
|
@ -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->spr.clipdist = 4;
|
||||
spawned->set_native_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->spr.clipdist = 40;
|
||||
spawned->set_native_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->spr.clipdist = 4;
|
||||
spawned->set_native_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->spr.clipdist = 4;
|
||||
spawned->set_native_clipdist(4);
|
||||
else
|
||||
spawned->spr.clipdist = 40;
|
||||
spawned->set_native_clipdist(40);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1163,7 +1163,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
|||
if (spawned)
|
||||
{
|
||||
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
|
||||
spawned->spr.clipdist = 32;
|
||||
spawned->set_native_clipdist(32);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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->spr.clipdist = 4;
|
||||
j->set_native_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->spr.clipdist = 4;
|
||||
spawned->set_native_clipdist(4);
|
||||
else
|
||||
spawned->spr.clipdist = 40;
|
||||
spawned->set_native_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->spr.clipdist = 4;
|
||||
j->set_native_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->spr.clipdist = 1;
|
||||
pact->set_native_clipdist(1);
|
||||
else
|
||||
pact->spr.clipdist = 64;
|
||||
pact->set_native_clipdist(64);
|
||||
|
||||
p->spritebridge = 0;
|
||||
|
||||
|
|
|
@ -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->spr.clipdist = 64;
|
||||
act->set_native_clipdist(64);
|
||||
|
||||
if (ps[j].last_extra == 0)
|
||||
{
|
||||
|
|
|
@ -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->spr.clipdist = 0;
|
||||
act->set_native_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->spr.clipdist = 80;
|
||||
act->set_native_clipdist(80);
|
||||
if (actj)
|
||||
{
|
||||
if (actj->spr.picnum == RESPAWN)
|
||||
|
@ -281,7 +281,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
|
|||
}
|
||||
else
|
||||
{
|
||||
act->spr.clipdist = 40;
|
||||
act->set_native_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->spr.clipdist = 1;
|
||||
else actor->spr.clipdist = 0;
|
||||
if (actor->spr.pal) actor->set_native_clipdist(1);
|
||||
else actor->set_native_clipdist(0);
|
||||
actor->temp_data[3] = sectp->int_floorz();
|
||||
sectp->hitagactor = actor;
|
||||
}
|
||||
|
|
|
@ -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->spr.clipdist = 80;
|
||||
act->set_native_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->spr.clipdist = 164;
|
||||
act->set_native_clipdist(164);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
act->spr.xrepeat = 40;
|
||||
act->spr.yrepeat = 40;
|
||||
act->spr.clipdist = 80;
|
||||
act->set_native_clipdist(80);
|
||||
}
|
||||
|
||||
if (actj)
|
||||
|
@ -417,7 +417,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case PIPE4:
|
||||
case PIPE5:
|
||||
case PIPE6:
|
||||
act->spr.clipdist = 32;
|
||||
act->set_native_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->spr.clipdist = 8;
|
||||
act->set_native_clipdist(8);
|
||||
}
|
||||
else
|
||||
{
|
||||
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
act->spr.clipdist = 32;
|
||||
act->set_native_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->spr.clipdist = 128;
|
||||
act->set_native_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->spr.clipdist = 80;
|
||||
act->set_native_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->spr.clipdist = 164;
|
||||
act->set_native_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->spr.clipdist = 80;
|
||||
act->set_native_clipdist(80);
|
||||
}
|
||||
else
|
||||
{
|
||||
act->spr.xrepeat = 60;
|
||||
act->spr.yrepeat = 60;
|
||||
act->spr.clipdist = 40;
|
||||
act->set_native_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->spr.clipdist = 8;
|
||||
act->set_native_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->spr.clipdist = 72;
|
||||
act->set_native_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->spr.clipdist = 24;
|
||||
act->set_native_clipdist(24);
|
||||
ps[connecthead].max_actors_killed++;
|
||||
}
|
||||
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
|
||||
|
|
Loading…
Reference in a new issue