From 41250d1751677d6bba412ff79a24d535056514ae Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 22 Jan 2018 19:19:17 -0500 Subject: [PATCH] Commiting what I have currently, but disabled --- src/p_user.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index dab7d1c9..b9a1924d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8872,6 +8872,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall thiscam->aiming = ANGLE_22h; } +#if 0 + // SRB2Kart: keep camera the same distance away from the player, while maintaining its angle + { + fixed_t xlen = (thiscam->x+thiscam->momx) - (mo->x+mo->momx); + fixed_t ylen = (thiscam->y+thiscam->momy) - (mo->y+mo->momy); + fixed_t xydist = P_AproxDistance(xlen, ylen); + thiscam->momx = FixedMul(dist, FixedDiv(xlen, xydist)); + thiscam->momy = FixedMul(dist, FixedDiv(ylen, xydist)); + } +#endif + return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming); }