Don't copy dontdrawforviewmobj to MT_OVERLAYs

This commit is contained in:
Zwip-Zwap Zapony 2023-08-29 17:12:04 +02:00
parent 7a1f952d9e
commit 2febb6ced9
2 changed files with 3 additions and 1 deletions

View file

@ -6882,7 +6882,6 @@ void P_RunOverlays(void)
mo->eflags = (mo->eflags & ~MFE_VERTICALFLIP) | (mo->target->eflags & MFE_VERTICALFLIP);
mo->scale = mo->destscale = mo->target->scale;
mo->angle = (mo->target->player ? mo->target->player->drawangle : mo->target->angle) + mo->movedir;
P_SetTarget(&mo->dontdrawforviewmobj, mo->target->dontdrawforviewmobj); // Hide the overlay from the view that its target is hidden from - But don't copy drawonlyforplayer!
if (!(mo->state->frame & FF_ANIMATE))
zoffs = FixedMul(((signed)mo->state->var2)*FRACUNIT, mo->scale);

View file

@ -1855,6 +1855,7 @@ void P_SpawnShieldOrb(player_t *player)
{
ov = P_SpawnMobj(shieldobj->x, shieldobj->y, shieldobj->z, MT_OVERLAY);
P_SetTarget(&ov->target, shieldobj);
P_SetTarget(&ov->dontdrawforviewmobj, player->mo); // Hide the shield in first-person
P_SetMobjState(ov, shieldobj->info->seestate);
P_SetTarget(&shieldobj->tracer, ov);
}
@ -1862,12 +1863,14 @@ void P_SpawnShieldOrb(player_t *player)
{
ov = P_SpawnMobj(shieldobj->x, shieldobj->y, shieldobj->z, MT_OVERLAY);
P_SetTarget(&ov->target, shieldobj);
P_SetTarget(&ov->dontdrawforviewmobj, player->mo); // Hide the shield in first-person
P_SetMobjState(ov, shieldobj->info->meleestate);
}
if (shieldobj->info->missilestate)
{
ov = P_SpawnMobj(shieldobj->x, shieldobj->y, shieldobj->z, MT_OVERLAY);
P_SetTarget(&ov->target, shieldobj);
P_SetTarget(&ov->dontdrawforviewmobj, player->mo); // Hide the shield in first-person
P_SetMobjState(ov, shieldobj->info->missilestate);
}
if (player->powers[pw_shield] & SH_FORCE)