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