mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 11:21:11 +00:00
Merge branch 'dodrawforviewmobj' into 'next'
Don't Copy mobj->dontdrawforviewmobj To MT_OVERLAYs See merge request STJr/SRB2!2125
This commit is contained in:
commit
a90422a30e
2 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
@ -2012,7 +2015,7 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
|
|||
mobj_t *ghost2 = P_SpawnGhostMobj(mobj->player->followmobj);
|
||||
P_SetTarget(&ghost2->tracer, ghost);
|
||||
P_SetTarget(&ghost->tracer, ghost2);
|
||||
P_SetTarget(&ghost2->dontdrawforviewmobj, mobj); // Hide the follow-ghost for the non-follow object
|
||||
P_SetTarget(&ghost2->dontdrawforviewmobj, mobj); // Hide the follow-ghost for the non-follow target
|
||||
ghost2->flags2 |= (mobj->player->followmobj->flags2 & MF2_LINKDRAW);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue