Skip to content

Commit

Permalink
- fixed sprite exclusion logic in getzrange.
Browse files Browse the repository at this point in the history
This was using the wrong flag.
  • Loading branch information
coelckers committed Jun 8, 2021
1 parent a32489b commit 5b38343
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/build/src/clip.cpp
Expand Up @@ -1081,7 +1081,7 @@ void getzrange(const vec3_t *pos, int16_t sectnum,
const int32_t cstat = sprite[j].cstat;
int32_t daz, daz2;

if (cstat & CSTAT_SPRITE_INVISIBLE) continue;
if (cstat & CSTAT_SPRITE_NOFIND) continue;
if (cstat&dasprclipmask)
{
int32_t clipyou = 0;
Expand Down
2 changes: 1 addition & 1 deletion source/games/duke/src/actors.cpp
Expand Up @@ -4956,7 +4956,7 @@ void getglobalz(DDukeActor* actor)
else zr = 127;

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);
s->cstat = cc;

Expand Down
2 changes: 1 addition & 1 deletion source/games/duke/src/animatesprites_r.cpp
Expand Up @@ -815,7 +815,7 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
break;
case UFOBEAM:
case RRTILE3586:
case RRTILE3587:
case LADDER:
t->cstat |= 32768;
s->cstat |= 32768;
break;
Expand Down
2 changes: 1 addition & 1 deletion source/games/duke/src/namelist_r.h
Expand Up @@ -933,7 +933,7 @@ y(RRTILE3500, 3500)
x(SLINGBLADE, 3510)
y(RRTILE3584, 3584)
y(RRTILE3586, 3586)
y(RRTILE3587, 3587)
y(LADDER, 3587)
y(RRTILE3600, 3600)
y(RRTILE3631, 3631)
y(RRTILE3635, 3635)
Expand Down
4 changes: 2 additions & 2 deletions source/games/duke/src/player_r.cpp
Expand Up @@ -3426,7 +3426,7 @@ void processinput_r(int snum)
chz.actor = nullptr;
cz = p->truecz;
}
else if (chz.actor->s->picnum == RRTILE3587)
else if (chz.actor->s->picnum == LADDER)
{
if (!p->stairs)
{
Expand Down Expand Up @@ -3473,7 +3473,7 @@ void processinput_r(int snum)
p->posxv -= bcos(j, 4);
p->posyv -= bsin(j, 4);
}
if (clz.actor->s->picnum == RRTILE3587)
if (clz.actor->s->picnum == LADDER)
{
if (!p->stairs)
{
Expand Down

0 comments on commit 5b38343

Please sign in to comment.