mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Merge branch 'orbital-flickering' into 'master'
Don't give player translucency when looking down with the orbital camera See merge request STJr/SRB2!659
This commit is contained in:
commit
e1303a2b5c
1 changed files with 5 additions and 1 deletions
|
@ -10280,13 +10280,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
if (!(multiplayer || netgame) && !splitscreen)
|
||||
{
|
||||
fixed_t vx = thiscam->x, vy = thiscam->y;
|
||||
fixed_t vz = thiscam->z + thiscam->height / 2;
|
||||
if (player->awayviewtics && player->awayviewmobj != NULL && !P_MobjWasRemoved(player->awayviewmobj)) // Camera must obviously exist
|
||||
{
|
||||
vx = player->awayviewmobj->x;
|
||||
vy = player->awayviewmobj->y;
|
||||
vz = player->awayviewmobj->z + player->awayviewmobj->height / 2;
|
||||
}
|
||||
|
||||
if (P_AproxDistance(vx - mo->x, vy - mo->y) < FixedMul(48*FRACUNIT, mo->scale))
|
||||
/* check z distance too for orbital camera */
|
||||
if (P_AproxDistance(P_AproxDistance(vx - mo->x, vy - mo->y),
|
||||
vz - ( mo->z + mo->height / 2 )) < FixedMul(48*FRACUNIT, mo->scale))
|
||||
mo->flags2 |= MF2_SHADOW;
|
||||
else
|
||||
mo->flags2 &= ~MF2_SHADOW;
|
||||
|
|
Loading…
Reference in a new issue