diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 524ad8893..2410e904f 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -5674,7 +5674,7 @@ static void K_drawKartFirstPerson(void) fixed_t scale; UINT8 *colmap = NULL; - if (stplyr->spectator || !stplyr->mo || (stplyr->mo->renderflags & RF_DONTDRAW)) + if (stplyr->spectator || !stplyr->mo || (stplyr->mo->renderflags & RF_DONTDRAW || stplyr->mo->state == &states[S_KART_DEAD])) return; { diff --git a/src/p_user.c b/src/p_user.c index d17673742..6a0b7cbf3 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4091,6 +4091,9 @@ Quaketilt (player_t *player) static void DoABarrelRoll (player_t *player) { + UINT8 viewnum = R_GetViewNumber(); + camera_t *cam = &camera[viewnum]; + angle_t slope; angle_t delta; @@ -4119,9 +4122,17 @@ DoABarrelRoll (player_t *player) slope = 0; } - if (AbsAngle(slope) > ANGLE_45) + if (cam->chase) { - slope = slope & ANGLE_180 ? InvAngle(ANGLE_45) : ANGLE_45; + if (AbsAngle(slope) > ANGLE_45) + { + slope = slope & ANGLE_180 ? InvAngle(ANGLE_45) : ANGLE_45; + } + } else { + if (AbsAngle(slope) > ANGLE_90) + { + slope = slope & ANGLE_180 ? InvAngle(ANGLE_90) : ANGLE_90; + } } slope -= Quaketilt(player); @@ -4129,7 +4140,7 @@ DoABarrelRoll (player_t *player) delta = slope - player->tilt; smoothing = FixedDiv(AbsAngle(slope), ANGLE_45); - delta = FixedDiv(delta, 33 * + delta = FixedDiv(delta, (cam->chase ? 33 : 11) * FixedDiv(FRACUNIT, FRACUNIT + smoothing)); if (delta) diff --git a/src/r_main.cpp b/src/r_main.cpp index 23fa4749f..9e18c8080 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -308,8 +308,18 @@ angle_t R_PointToAnglePlayer(player_t *player, fixed_t x, fixed_t y) { refx = cam->x; refy = cam->y; - } + // Bandaid for two very specific bugs that arise with chasecam off. + // 1: Camera tilt from slopes wouldn't apply correctly in first person. + // 2: Trick pies would appear strangely in first person. + if (player->mo) + { + if ((!cam->chase) && player->mo->x == x && player->mo->y == y) + { + return player->mo->angle; + } + } + } return R_PointToAngle2(refx, refy, x, y); }