grr, shadows

This commit is contained in:
Alam Arias 2014-04-17 17:51:56 -04:00 committed by Alam Ed Arias
parent d6e48e2168
commit 7fb530fd18
1 changed files with 6 additions and 6 deletions

View File

@ -8394,18 +8394,18 @@ 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)
{ {
fixed_t x = 0, y = 0; fixed_t vx = 0, vy = 0;
if (player->awayviewtics) { if (player->awayviewtics) {
x = player->awayviewmobj->x; vx = player->awayviewmobj->x;
y = player->awayviewmobj->y; vy = player->awayviewmobj->y;
} }
else else
{ {
x = thiscam->x; vx = thiscam->x;
y = thiscam->y; vy = thiscam->y;
} }
if (P_AproxDistance(x - player->mo->x, y - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale)) if (P_AproxDistance(vx - player->mo->x, vy - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale))
player->mo->flags2 |= MF2_SHADOW; player->mo->flags2 |= MF2_SHADOW;
else else
player->mo->flags2 &= ~MF2_SHADOW; player->mo->flags2 &= ~MF2_SHADOW;