diff --git a/source/core/gameinput.h b/source/core/gameinput.h index 44e058ccd..1e2b4ea11 100644 --- a/source/core/gameinput.h +++ b/source/core/gameinput.h @@ -94,9 +94,9 @@ struct PlayerHorizon return q16horiz(interpolatedvalue(osum().asq16(), sum().asq16(), smoothratio)); } - double horizsumfrac(bool const precise, double const smoothratio) + double horizsumfrac(double const smoothratio) { - return !precise ? sum().asq16() >> 20 : (!SyncInput() ? sum() : interpolatedsum(smoothratio)).asbuildf() * (1. / 16.); // Used within draw code for Duke. + return (!SyncInput() ? sum() : interpolatedsum(smoothratio)).asbuildf() * (1. / 16.); // Used within draw code for Duke. } void sethorizon(float const horz, ESyncBits* actions, double const scaleAdjust = 1); @@ -229,14 +229,14 @@ struct PlayerAngle return interpolatedangle(orotscrnang, rotscrnang, smoothratio); } - double look_anghalf(bool const precise, double const smoothratio) + double look_anghalf(double const smoothratio) { - return !precise ? look_ang.signedbam() >> 22 : (!SyncInput() ? look_ang : interpolatedlookang(smoothratio)).signedbuildf() * 0.5; // Used within draw code for weapon and crosshair when looking left/right. + return (!SyncInput() ? look_ang : interpolatedlookang(smoothratio)).signedbuildf() * 0.5; // Used within draw code for weapon and crosshair when looking left/right. } - double looking_arc(bool const precise, double const smoothratio) + double looking_arc(double const smoothratio) { - return !precise ? abs(look_ang.signedbuild()) / 9 : fabs((!SyncInput() ? look_ang : interpolatedlookang(smoothratio)).signedbuildf()) * (1. / 9.); // Used within draw code for weapon and crosshair when looking left/right. + return fabs((!SyncInput() ? look_ang : interpolatedlookang(smoothratio)).signedbuildf()) * (1. / 9.); // Used within draw code for weapon and crosshair when looking left/right. } void applylook(float const avel, ESyncBits* actions, double const scaleAdjust = 1); diff --git a/source/games/blood/src/hudsprites.cpp b/source/games/blood/src/hudsprites.cpp index c1fe2103b..4da7c6410 100644 --- a/source/games/blood/src/hudsprites.cpp +++ b/source/games/blood/src/hudsprites.cpp @@ -91,13 +91,13 @@ static void viewBurnTime(int gScale) void hudDraw(PLAYER *gView, int nSectnum, double bobx, double boby, double zDelta, int basepal, double smoothratio) { - double look_anghalf = gView->angle.look_anghalf(cl_hudinterpolation, smoothratio); + double look_anghalf = gView->angle.look_anghalf(smoothratio); DrawCrosshair(kCrosshairTile, gView->pXSprite->health >> 4, -look_anghalf, 0, 2); if (gViewPos == 0) { - double looking_arc = gView->angle.looking_arc(cl_hudinterpolation, smoothratio); + double looking_arc = gView->angle.looking_arc(smoothratio); double cX = 160 - look_anghalf; double cY = 220 + looking_arc; diff --git a/source/games/duke/src/game_misc.cpp b/source/games/duke/src/game_misc.cpp index 53acadb3f..2122389dc 100644 --- a/source/games/duke/src/game_misc.cpp +++ b/source/games/duke/src/game_misc.cpp @@ -293,7 +293,7 @@ void drawoverlays(double smoothratio) if (ps[myconnectindex].newOwner == nullptr && ud.cameraactor == nullptr) { - DrawCrosshair(TILE_CROSSHAIR, ps[screenpeek].last_extra, -pp->angle.look_anghalf(cl_hudinterpolation, smoothratio), pp->over_shoulder_on ? 2.5 : 0, isRR() ? 0.5 : 1); + DrawCrosshair(TILE_CROSSHAIR, ps[screenpeek].last_extra, -pp->angle.look_anghalf(smoothratio), pp->over_shoulder_on ? 2.5 : 0, isRR() ? 0.5 : 1); } if (paused == 2) diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index 9a805b229..0d88667a5 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -244,9 +244,9 @@ void displayweapon_d(int snum, double smoothratio) } plravel = getavel(snum) * (1. / 16.); - horiz16th = p->horizon.horizsumfrac(cl_hudinterpolation, smoothratio); - look_anghalf = p->angle.look_anghalf(cl_hudinterpolation, smoothratio); - looking_arc = p->angle.looking_arc(cl_hudinterpolation, smoothratio); + horiz16th = p->horizon.horizsumfrac(smoothratio); + look_anghalf = p->angle.look_anghalf(smoothratio); + looking_arc = p->angle.looking_arc(smoothratio); hard_landing *= 8.; gun_pos -= fabs(p->GetActor()->s->xrepeat < 32 ? bsinf(weapon_sway * 4., -9) : bsinf(weapon_sway * 0.5, -10)); diff --git a/source/games/duke/src/hudweapon_r.cpp b/source/games/duke/src/hudweapon_r.cpp index d592460db..d04c09b18 100644 --- a/source/games/duke/src/hudweapon_r.cpp +++ b/source/games/duke/src/hudweapon_r.cpp @@ -133,8 +133,8 @@ void displayweapon_r(int snum, double smoothratio) TiltStatus = p->TiltStatus; } - look_anghalf = p->angle.look_anghalf(cl_hudinterpolation, smoothratio); - looking_arc = p->angle.looking_arc(cl_hudinterpolation, smoothratio); + look_anghalf = p->angle.look_anghalf(smoothratio); + looking_arc = p->angle.looking_arc(smoothratio); hard_landing *= 8.; gun_pos -= fabs(p->GetActor()->s->xrepeat < 8 ? bsinf(weapon_sway * 4., -9) : bsinf(weapon_sway * 0.5, -10)); diff --git a/source/games/exhumed/src/gameloop.cpp b/source/games/exhumed/src/gameloop.cpp index ac7c97326..d810eab56 100644 --- a/source/games/exhumed/src/gameloop.cpp +++ b/source/games/exhumed/src/gameloop.cpp @@ -93,7 +93,7 @@ void GameInterface::Render() DrawView(smoothratio); DrawStatusBar(); - DrawCrosshair(MAXTILES, PlayerList[nLocalPlayer].nHealth >> 3, -PlayerList[nLocalPlayer].angle.look_anghalf(cl_hudinterpolation, smoothratio), 0, 1); + DrawCrosshair(MAXTILES, PlayerList[nLocalPlayer].nHealth >> 3, -PlayerList[nLocalPlayer].angle.look_anghalf(smoothratio), 0, 1); if (paused && !M_Active()) { diff --git a/source/games/exhumed/src/gun.cpp b/source/games/exhumed/src/gun.cpp index 38947cc20..c44154707 100644 --- a/source/games/exhumed/src/gun.cpp +++ b/source/games/exhumed/src/gun.cpp @@ -997,8 +997,8 @@ void DrawWeapons(double smooth) nShade = sprite[PlayerList[nLocalPlayer].nSprite].shade; } - double const look_anghalf = PlayerList[nLocalPlayer].angle.look_anghalf(cl_hudinterpolation, smooth); - double const looking_arc = PlayerList[nLocalPlayer].angle.looking_arc(cl_hudinterpolation, smooth); + double const look_anghalf = PlayerList[nLocalPlayer].angle.look_anghalf(smooth); + double const looking_arc = PlayerList[nLocalPlayer].angle.looking_arc(smooth); xOffset -= look_anghalf; yOffset += looking_arc; diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index eacdfc21e..a89eba696 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1100,7 +1100,7 @@ void DrawCrosshair(PLAYERp pp) if (!(CameraTestMode)) { USERp u = User[pp->PlayerSprite]; - ::DrawCrosshair(2326, u->Health, -pp->angle.look_anghalf(cl_hudinterpolation, smoothratio), TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE) ? 5 : 0, 2, shadeToLight(10)); + ::DrawCrosshair(2326, u->Health, -pp->angle.look_anghalf(smoothratio), TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE) ? 5 : 0, 2, shadeToLight(10)); } } diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 5c13c16e5..70ef945d4 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -6897,8 +6897,8 @@ pDisplaySprites(PLAYERp pp, double smoothratio) short ang; int flags; - double const look_anghalf = pp->angle.look_anghalf(cl_hudinterpolation, smoothratio); - double const looking_arc = pp->angle.looking_arc(cl_hudinterpolation, smoothratio); + double const look_anghalf = pp->angle.look_anghalf(smoothratio); + double const looking_arc = pp->angle.looking_arc(smoothratio); TRAVERSE(&pp->PanelSpriteList, psp, next) {