From 6be611fd94a1b9166b14e5b9b5fc07a484dab13a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 12 Sep 2021 18:32:11 +0200 Subject: [PATCH] - fixed merge. --- source/games/duke/src/actors.cpp | 9 +++++---- source/games/duke/src/spawn.cpp | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index b9cabe433..d81b07b76 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -1009,7 +1009,8 @@ void movemasterswitch(DDukeActor *actor, int spectype1, int spectype2) // This originally depended on undefined behavior as the deleted sprite was still used for the sound // with no checking if it got reused in the mean time. spri->picnum = 0; // give it a picnum without any behavior attached, just in case - spri->cstat |= CSTAT_SPRITE_INVISIBLE|CSTAT_SPRITE_NOFIND; + spri->cstat |= CSTAT_SPRITE_INVISIBLE; + spri->cstat2 |= CSTAT2_SPRITE_NOFIND; changespritestat(actor, STAT_REMOVED); } } @@ -4955,10 +4956,10 @@ void getglobalz(DDukeActor* actor) zr = 4; else zr = 127; - auto cc = s->cstat; - s->cstat |= CSTAT_SPRITE_NOFIND; // don't clip against self. getzrange cannot detect this because it only receives a coordinate. + auto cc = s->cstat2; + s->cstat2 |= CSTAT2_SPRITE_NOFIND; // don't clip against self. getzrange cannot detect this because it only receives a coordinate. getzrange_ex(s->x, s->y, s->z - (FOURSLEIGHT), s->sectnum, &actor->ceilingz, hz, &actor->floorz, lz, zr, CLIPMASK0); - s->cstat = cc; + s->cstat2 = cc; if( lz.type == kHitSprite && (lz.actor->s->cstat&48) == 0 ) { diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index 44043f7c3..2c0336fa7 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -995,7 +995,8 @@ void spawneffector(DDukeActor* actor) if (!found) { sp->picnum = 0; - sp->cstat = CSTAT_SPRITE_NOFIND; + sp->cstat2 = CSTAT2_SPRITE_NOFIND; + sp->cstat = CSTAT_SPRITE_INVISIBLE; changespritesect(actor, STAT_REMOVED); Printf("Found lonely Sector Effector (lotag 0) at (%d,%d)\n", sp->x, sp->y); return;