mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
-Duke/RR: Automatic replacement for CSTAT_SPRITE_INVISIBLE and CSTAT_SPRITE_BLOCK_ALL
This commit is contained in:
parent
8d0013128e
commit
98f0886b3d
7 changed files with 38 additions and 38 deletions
|
@ -375,7 +375,7 @@ void movedummyplayers(void)
|
|||
else
|
||||
{
|
||||
if (spri->sector()->lotag != 2) spri->z = spri->sector()->floorz;
|
||||
spri->cstat = 32768;
|
||||
spri->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -444,7 +444,7 @@ void moveplayers(void)
|
|||
if (ud.god)
|
||||
{
|
||||
spri->extra = gs.max_player_health;
|
||||
spri->cstat = 257;
|
||||
spri->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
if (!isWW2GI() && !isRR())
|
||||
p->jetpack_amount = 1599;
|
||||
}
|
||||
|
@ -1048,7 +1048,7 @@ void movewaterdrip(DDukeActor *actor, int drip)
|
|||
{
|
||||
t[1]--;
|
||||
if (t[1] == 0)
|
||||
s->cstat &= 32767;
|
||||
s->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1520,7 +1520,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
if (s->xvel < 0) s->xvel = 0;
|
||||
if (s->picnum == stripeball)
|
||||
{
|
||||
s->cstat = 257;
|
||||
s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
s->cstat |= 4 & s->xvel;
|
||||
s->cstat |= 8 & s->xvel;
|
||||
}
|
||||
|
@ -1595,7 +1595,7 @@ void forcesphere(DDukeActor* actor, int forcesphere)
|
|||
auto k = spawn(actor, forcesphere);
|
||||
if (k)
|
||||
{
|
||||
k->s->cstat = 257 + 128;
|
||||
k->s->cstat = CSTAT_SPRITE_BLOCK_ALL + 128;
|
||||
k->s->clipdist = 64;
|
||||
k->s->ang = j;
|
||||
k->s->zvel = bsin(l, -5);
|
||||
|
@ -1657,10 +1657,10 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
{
|
||||
if (actor_tog == 1)
|
||||
{
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
return;
|
||||
}
|
||||
else if (actor_tog == 2) s->cstat = 257;
|
||||
else if (actor_tog == 2) s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
if (fi.ifhitbyweapon(actor) >= 0)
|
||||
{
|
||||
|
@ -1882,7 +1882,7 @@ void reactor(DDukeActor* const actor, int REACTOR, int REACTOR2, int REACTORBURN
|
|||
}
|
||||
else if (sprj->picnum == REACTORSPARK || sprj->picnum == REACTOR2SPARK)
|
||||
{
|
||||
sprj->cstat = 32768;
|
||||
sprj->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -2001,7 +2001,7 @@ void camera(DDukeActor *actor)
|
|||
if (j >= 0)
|
||||
{
|
||||
t[0] = 1; // static
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
for (int x = 0; x < 5; x++)
|
||||
RANDOMSCRAP(actor);
|
||||
return;
|
||||
|
|
|
@ -2122,7 +2122,7 @@ void movetransports_d(void)
|
|||
case PLAYERONWATER:
|
||||
if (sectlotag == 2)
|
||||
{
|
||||
spr2->cstat &= 32767;
|
||||
spr2->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
break;
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
@ -2240,10 +2240,10 @@ static void greenslime(DDukeActor *actor)
|
|||
{
|
||||
if (actor_tog == 1)
|
||||
{
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
return;
|
||||
}
|
||||
else if (actor_tog == 2) s->cstat = 257;
|
||||
else if (actor_tog == 2) s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
@ -2279,7 +2279,7 @@ static void greenslime(DDukeActor *actor)
|
|||
return;
|
||||
}
|
||||
makeitfall(actor);
|
||||
s->cstat = 257;
|
||||
s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
s->picnum = GREENSLIME + 2;
|
||||
s->extra = 1;
|
||||
s->pal = 1;
|
||||
|
@ -2309,7 +2309,7 @@ static void greenslime(DDukeActor *actor)
|
|||
|
||||
if (x < 1596)
|
||||
s->cstat = 0;
|
||||
else s->cstat = 257;
|
||||
else s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
if (t[0] == -4) //On the player
|
||||
{
|
||||
|
@ -2745,7 +2745,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
{
|
||||
S_PlayActorSound(TELEPORTER, actor);
|
||||
spawn(actor, TRANSPORTERSTAR);
|
||||
s->cstat = 257;
|
||||
s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -2891,7 +2891,7 @@ DETONATEB:
|
|||
{
|
||||
t[2] = gs.respawnitemtime;
|
||||
spawn(actor, RESPAWNMARKERRED);
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
s->yrepeat = 9;
|
||||
return;
|
||||
}
|
||||
|
@ -2934,7 +2934,7 @@ DETONATEB:
|
|||
{
|
||||
t[2] = gs.respawnitemtime;
|
||||
spawn(actor, RESPAWNMARKERRED);
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3107,10 +3107,10 @@ void moveactors_d(void)
|
|||
{
|
||||
if (actor_tog == 1)
|
||||
{
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
continue;
|
||||
}
|
||||
else if (actor_tog == 2) s->cstat = 257;
|
||||
else if (actor_tog == 2) s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
@ -3471,7 +3471,7 @@ static void handle_se28(DDukeActor* actor)
|
|||
{
|
||||
if (rnd(32) && (t[2] & 1))
|
||||
{
|
||||
act2->s->cstat &= 32767;
|
||||
act2->s->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
spawn(act2, SMALLSMOKE);
|
||||
|
||||
int x;
|
||||
|
|
|
@ -1807,7 +1807,7 @@ void movetransports_r(void)
|
|||
case PLAYERONWATER:
|
||||
if (sectlotag == ST_2_UNDERWATER)
|
||||
{
|
||||
spr2->cstat &= 32767;
|
||||
spr2->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
break;
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
@ -2515,7 +2515,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
{
|
||||
S_PlayActorSound(TELEPORTER, actor);
|
||||
spawn(actor, TRANSPORTERSTAR);
|
||||
s->cstat = 257;
|
||||
s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -2723,7 +2723,7 @@ DETONATEB:
|
|||
{
|
||||
t[2] = gs.respawnitemtime;
|
||||
spawn(actor, RESPAWNMARKERRED);
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2786,7 +2786,7 @@ static int henstand(DDukeActor *actor)
|
|||
}
|
||||
s->xvel--;
|
||||
if (s->xvel < 0) s->xvel = 0;
|
||||
s->cstat = 257;
|
||||
s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
if (s->picnum == BOWLINGPIN)
|
||||
{
|
||||
s->cstat |= 4 & s->xvel;
|
||||
|
@ -3081,10 +3081,10 @@ void moveactors_r(void)
|
|||
{
|
||||
if( actor_tog == 1)
|
||||
{
|
||||
s->cstat = 32768;
|
||||
s->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
continue;
|
||||
}
|
||||
else if(actor_tog == 2) s->cstat = 257;
|
||||
else if(actor_tog == 2) s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ static const char *cheatGod(int myconnectindex, int state)
|
|||
if (ud.god)
|
||||
{
|
||||
if (isRRRA()) S_PlaySound(218, CHAN_AUTO, CHANF_UI);
|
||||
act->s->cstat = 257;
|
||||
act->s->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
act->temp_data[0] = 0;
|
||||
act->temp_data[1] = 0;
|
||||
|
|
|
@ -2255,7 +2255,7 @@ int ParseState::parse(void)
|
|||
g_sp->backuppos();
|
||||
updatesector(ps[g_p].pos.x, ps[g_p].pos.y, &ps[g_p].cursector);
|
||||
SetActor(ps[g_p].GetActor(), { ps[g_p].pos.x, ps[g_p].pos.y, ps[g_p].pos.z + gs.playerheight });
|
||||
g_sp->cstat = 257;
|
||||
g_sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
g_sp->shade = -12;
|
||||
g_sp->clipdist = 64;
|
||||
|
|
|
@ -701,7 +701,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
if (ud.recstat == 1)
|
||||
{
|
||||
sp->xrepeat = sp->yrepeat = 64;
|
||||
sp->cstat &= 32767;
|
||||
sp->cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
break;
|
||||
case SE_47_LIGHT_SWITCH:
|
||||
|
|
|
@ -134,7 +134,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
return act;
|
||||
case SERIOUSSAM:
|
||||
ChangeActorStat(act, 2);
|
||||
sp->cstat = 257;
|
||||
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
sp->extra = 150;
|
||||
return act;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case FORCESPHERE:
|
||||
if (!spj)
|
||||
{
|
||||
sp->cstat = 32768;
|
||||
sp->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
ChangeActorStat(act, 2);
|
||||
}
|
||||
else
|
||||
|
@ -594,7 +594,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
}
|
||||
sp->cstat = 32768;
|
||||
sp->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
ChangeActorStat(act, 11);
|
||||
break;
|
||||
|
||||
|
@ -919,7 +919,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
case ACTIVATORLOCKED:
|
||||
case ACTIVATOR:
|
||||
sp->cstat = 32768;
|
||||
sp->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
if (sp->picnum == ACTIVATORLOCKED)
|
||||
sp->sector()->lotag |= 16384;
|
||||
ChangeActorStat(act, 8);
|
||||
|
@ -1066,7 +1066,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case TIRE:
|
||||
case CONE:
|
||||
case BOX:
|
||||
sp->cstat = 257; // Make it hitable
|
||||
sp->cstat = CSTAT_SPRITE_BLOCK_ALL; // Make it hitable
|
||||
sp->extra = 1;
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
break;
|
||||
|
@ -1093,7 +1093,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case CAMERAPOLE:
|
||||
sp->extra = 1;
|
||||
|
||||
if (gs.camerashitable) sp->cstat = 257;
|
||||
if (gs.camerashitable) sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
else sp->cstat = 0;
|
||||
[[fallthrough]];
|
||||
|
||||
|
@ -1136,7 +1136,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
sp->shade = -16;
|
||||
if (sp->xrepeat <= 8)
|
||||
{
|
||||
sp->cstat = 32768;
|
||||
sp->cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
sp->xrepeat = sp->yrepeat = 0;
|
||||
}
|
||||
else sp->cstat = 1 + 256;
|
||||
|
@ -1152,7 +1152,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case FIREEXT:
|
||||
if (sp->picnum == FIREEXT)
|
||||
{
|
||||
sp->cstat = 257;
|
||||
sp->cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
sp->extra = gs.impact_damage << 2;
|
||||
}
|
||||
else
|
||||
|
@ -1219,7 +1219,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
sp->clipdist = 24;
|
||||
ps[connecthead].max_actors_killed++;
|
||||
}
|
||||
sp->cstat = 257 | (krand() & 4);
|
||||
sp->cstat = CSTAT_SPRITE_BLOCK_ALL | (krand() & 4);
|
||||
ChangeActorStat(act, STAT_ZOMBIEACTOR);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue