From fa79c1856c1f2985ccd8c774f80f171de3587c2b Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Thu, 17 Apr 2014 13:46:40 -0500 Subject: [PATCH 1/4] Make player seethru code account for cut-away view --- src/p_user.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 8b793e810..abded5621 100644 --- a/src/p_user.c +++ b/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). - 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; + if (!(multiplayer || netgame) && !splitscreen) + { + fixed_t x = 0, y = 0; + if (player->awayviewtics) { + x = player->awayviewmobj->x; + y = player->awayviewmobj->y; + } + else + { + x = thiscam->x; + y = thiscam->y; + } + + if (P_AproxDistance(x - player->mo->x, y - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale)) + player->mo->flags2 |= MF2_SHADOW; + else + player->mo->flags2 &= ~MF2_SHADOW; + } else player->mo->flags2 &= ~MF2_SHADOW; From d6e48e216836e02da37a5eb7130751bf3f214998 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 17 Apr 2014 17:47:51 -0400 Subject: [PATCH 2/4] whitespace cleanup --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index abded5621..9cd1e31b6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8404,7 +8404,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall x = thiscam->x; y = thiscam->y; } - + if (P_AproxDistance(x - player->mo->x, y - player->mo->y) < FixedMul(48*FRACUNIT, mo->scale)) player->mo->flags2 |= MF2_SHADOW; else From 7fb530fd18fb7241a18f8b1aeeddf95e6f5c50b8 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Thu, 17 Apr 2014 17:51:56 -0400 Subject: [PATCH 3/4] grr, shadows --- src/p_user.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 9cd1e31b6..0c016dfc1 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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). if (!(multiplayer || netgame) && !splitscreen) { - fixed_t x = 0, y = 0; + fixed_t vx = 0, vy = 0; if (player->awayviewtics) { - x = player->awayviewmobj->x; - y = player->awayviewmobj->y; + vx = player->awayviewmobj->x; + vy = player->awayviewmobj->y; } else { - x = thiscam->x; - y = thiscam->y; + vx = thiscam->x; + 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; else player->mo->flags2 &= ~MF2_SHADOW; From f3e8c01565be24d85880440ee401159b3d8b1b88 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 18 Apr 2014 11:16:18 -0400 Subject: [PATCH 4/4] Update interfaces I_UpdateMumble function --- src/android/i_system.c | 7 +++++-- src/djgppdos/i_system.c | 7 +++++-- src/nds/i_system.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/android/i_system.c b/src/android/i_system.c index 0eacc4282..150cbd505 100644 --- a/src/android/i_system.c +++ b/src/android/i_system.c @@ -158,10 +158,13 @@ void I_SetupMumble(void) { } -void I_UpdateMumble(const MumblePos_t *MPos) +#ifndef NOMUMBLE +void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) { - (void)MPos; + (void)mobj; + (void)listener; } +#endif void I_OutputMsg(const char *fmt, ...) { diff --git a/src/djgppdos/i_system.c b/src/djgppdos/i_system.c index 421652760..854d68f4d 100644 --- a/src/djgppdos/i_system.c +++ b/src/djgppdos/i_system.c @@ -175,10 +175,13 @@ void I_SetupMumble(void) { } -void I_UpdateMumble(const MumblePos_t *MPos) +#ifndef NOMUMBLE +void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) { - (void)MPos; + (void)mobj; + (void)listener; } +#endif // // Allocates the base zone memory, diff --git a/src/nds/i_system.c b/src/nds/i_system.c index ab30c7eb5..0ed58029c 100644 --- a/src/nds/i_system.c +++ b/src/nds/i_system.c @@ -149,10 +149,13 @@ void I_SetupMumble(void) { } -void I_UpdateMumble(const MumblePos_t *MPos) +#ifndef NOMUMBLE +void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) { - (void)MPos; + (void)mobj; + (void)listener; } +#endif void I_OutputMsg(const char *error, ...) {