From 58d02e6f2b9ea45d74315a92a2c1f73d33cf0bf1 Mon Sep 17 00:00:00 2001 From: yellowtd Date: Thu, 16 Mar 2017 01:51:43 -0400 Subject: [PATCH] Fix Viewrollangle in water viewrollangle never worked in water, it does now --- src/p_mobj.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 545603b9b..6d67ffe0b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3526,17 +3526,17 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled dummycam.y = player->awayviewmobj->y; dummycam.z = player->awayviewmobj->z; dummycam.height = 40*FRACUNIT; // alt view height is 20*FRACUNIT - // Are we in water? - if (P_CameraCheckWater(&dummycam)) - postimg = postimg_water; - else if (P_CameraCheckHeat(&dummycam)) - postimg = postimg_heat; - // miru: assign new postimg on displays - else if (P_CheckViewRoll(player)) + // miru: assign viewroll (awayview) + if (P_CheckViewRoll(player)) { postimg = postimg_roll; postimgparam = player->viewrollangle; - } + } + // Are we in water? + else if (P_CameraCheckWater(&dummycam)) + postimg = postimg_water; + else if (P_CameraCheckHeat(&dummycam)) + postimg = postimg_heat; else if (P_CheckMotionBlur()) { postimg = postimg_motion; @@ -3547,17 +3547,18 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled } } else - { - // Are we in water? - if (P_CameraCheckWater(thiscam)) - postimg = postimg_water; - else if (P_CameraCheckHeat(thiscam)) - postimg = postimg_heat; - else if (P_CheckViewRoll(player)) + { + // miru: assign viewroll + if (P_CheckViewRoll(player)) { postimg = postimg_roll; postimgparam = player->viewrollangle; - } + } + // Are we in water? + else if (P_CameraCheckWater(thiscam)) + postimg = postimg_water; + else if (P_CameraCheckHeat(thiscam)) + postimg = postimg_heat; else if (P_CheckMotionBlur()) { postimg = postimg_motion;