mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'master' into sdl2
This commit is contained in:
commit
a4919454e8
1 changed files with 18 additions and 3 deletions
21
src/p_user.c
21
src/p_user.c
|
@ -8392,9 +8392,24 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make player translucent if camera is too close (only in single player).
|
// Make player translucent if camera is too close (only in single player).
|
||||||
if (!(multiplayer || netgame) && !splitscreen
|
if (!(multiplayer || netgame) && !splitscreen)
|
||||||
&& P_AproxDistance(thiscam->x - player->mo->x, thiscam->y - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale))
|
{
|
||||||
player->mo->flags2 |= MF2_SHADOW;
|
fixed_t vx = 0, vy = 0;
|
||||||
|
if (player->awayviewtics) {
|
||||||
|
vx = player->awayviewmobj->x;
|
||||||
|
vy = player->awayviewmobj->y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vx = thiscam->x;
|
||||||
|
vy = thiscam->y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (P_AproxDistance(vx - player->mo->x, vy - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale))
|
||||||
|
player->mo->flags2 |= MF2_SHADOW;
|
||||||
|
else
|
||||||
|
player->mo->flags2 &= ~MF2_SHADOW;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
player->mo->flags2 &= ~MF2_SHADOW;
|
player->mo->flags2 &= ~MF2_SHADOW;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue