diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 513fc5453..e28719551 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -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; diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index a2fb9f3a7..c727b3026 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -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; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 2b1bbe5dd..b1808f8e6 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -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 diff --git a/source/games/duke/src/cheats.cpp b/source/games/duke/src/cheats.cpp index 1b9060380..f177cbe29 100644 --- a/source/games/duke/src/cheats.cpp +++ b/source/games/duke/src/cheats.cpp @@ -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; diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 33d4a162b..f5a1faed0 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -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; diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index 6c9f09664..e1ab346fc 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -701,7 +701,7 @@ void spawneffector(DDukeActor* actor, TArray* actors) if (ud.recstat == 1) { sp->xrepeat = sp->yrepeat = 64; - sp->cstat &= 32767; + sp->cstat &= ~CSTAT_SPRITE_INVISIBLE; } break; case SE_47_LIGHT_SWITCH: diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index bfaafa406..51cb25d3c 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -134,7 +134,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* 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* 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* 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* 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* 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* 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* 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* 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* 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;