- fixed sprite exclusion logic in getzrange.

This was using the wrong flag.
This commit is contained in:
Christoph Oelckers 2021-06-09 00:31:18 +02:00
parent a32489be31
commit 5b38343407
5 changed files with 6 additions and 6 deletions

View file

@ -1081,7 +1081,7 @@ void getzrange(const vec3_t *pos, int16_t sectnum,
const int32_t cstat = sprite[j].cstat; const int32_t cstat = sprite[j].cstat;
int32_t daz, daz2; int32_t daz, daz2;
if (cstat & CSTAT_SPRITE_INVISIBLE) continue; if (cstat & CSTAT_SPRITE_NOFIND) continue;
if (cstat&dasprclipmask) if (cstat&dasprclipmask)
{ {
int32_t clipyou = 0; int32_t clipyou = 0;

View file

@ -4956,7 +4956,7 @@ void getglobalz(DDukeActor* actor)
else zr = 127; else zr = 127;
auto cc = s->cstat; auto cc = s->cstat;
s->cstat |= CSTAT_SPRITE_INVISIBLE; // don't clip against self. getzrange cannot detect this because it only receives a coordinate. s->cstat |= CSTAT_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); getzrange_ex(s->x, s->y, s->z - (FOURSLEIGHT), s->sectnum, &actor->ceilingz, hz, &actor->floorz, lz, zr, CLIPMASK0);
s->cstat = cc; s->cstat = cc;

View file

@ -815,7 +815,7 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
break; break;
case UFOBEAM: case UFOBEAM:
case RRTILE3586: case RRTILE3586:
case RRTILE3587: case LADDER:
t->cstat |= 32768; t->cstat |= 32768;
s->cstat |= 32768; s->cstat |= 32768;
break; break;

View file

@ -933,7 +933,7 @@ y(RRTILE3500, 3500)
x(SLINGBLADE, 3510) x(SLINGBLADE, 3510)
y(RRTILE3584, 3584) y(RRTILE3584, 3584)
y(RRTILE3586, 3586) y(RRTILE3586, 3586)
y(RRTILE3587, 3587) y(LADDER, 3587)
y(RRTILE3600, 3600) y(RRTILE3600, 3600)
y(RRTILE3631, 3631) y(RRTILE3631, 3631)
y(RRTILE3635, 3635) y(RRTILE3635, 3635)

View file

@ -3426,7 +3426,7 @@ void processinput_r(int snum)
chz.actor = nullptr; chz.actor = nullptr;
cz = p->truecz; cz = p->truecz;
} }
else if (chz.actor->s->picnum == RRTILE3587) else if (chz.actor->s->picnum == LADDER)
{ {
if (!p->stairs) if (!p->stairs)
{ {
@ -3473,7 +3473,7 @@ void processinput_r(int snum)
p->posxv -= bcos(j, 4); p->posxv -= bcos(j, 4);
p->posyv -= bsin(j, 4); p->posyv -= bsin(j, 4);
} }
if (clz.actor->s->picnum == RRTILE3587) if (clz.actor->s->picnum == LADDER)
{ {
if (!p->stairs) if (!p->stairs)
{ {