Check for sector special flag instead of special number

This commit is contained in:
spherallic 2022-09-16 23:05:24 +02:00
parent b7dd3ac4bf
commit 2664fc700a

View file

@ -1966,22 +1966,22 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
ghost->angle = (mobj->player ? mobj->player->drawangle : mobj->angle);
ghost->rollangle = mobj->rollangle;
ghost->sprite = mobj->sprite;
ghost->sprite2 = mobj->sprite2;
ghost->frame = mobj->frame;
ghost->tics = -1;
ghost->frame &= ~FF_TRANSMASK;
ghost->frame |= tr_trans50<<FF_TRANSSHIFT;
ghost->renderflags = mobj->renderflags;
ghost->blendmode = mobj->blendmode;
ghost->spritexscale = mobj->spritexscale;
ghost->spriteyscale = mobj->spriteyscale;
ghost->spritexoffset = mobj->spritexoffset;
ghost->spriteyoffset = mobj->spriteyoffset;
ghost->fuse = ghost->info->damage;
ghost->skin = mobj->skin;
@ -12602,7 +12602,7 @@ void P_PlayerAfterThink(player_t *player)
else
zdist = mo->z - fan->z;
if ((fan->type != MT_FAN && !P_PlayerTouchingSectorSpecial(player, 4, 5))
if ((fan->type != MT_FAN && !P_PlayerTouchingSectorSpecialFlag(player, SSF_FAN))
|| (fan->type == MT_FAN && (abs(mo->x - fan->x) > fan->radius || abs(mo->y - fan->y) > fan->radius || zdist > (fan->health << FRACBITS))))
{
P_SetTarget(&player->mo->tracer, NULL);