From 208525e682a67550c672f31e7d2381f09757bd38 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Sun, 13 Aug 2023 04:52:24 +0200 Subject: [PATCH] Small fix --- src/client/component/camera.cpp | 8 ++++++++ src/client/component/fps.cpp | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/client/component/camera.cpp b/src/client/component/camera.cpp index 8281ec43..a68b317b 100644 --- a/src/client/component/camera.cpp +++ b/src/client/component/camera.cpp @@ -53,6 +53,14 @@ namespace camera return; } + if (cg_paused->modified) + { + ps->origin[0] = game::refdef->org[0]; + ps->origin[1] = game::refdef->org[1]; + ps->origin[2] = game::refdef->org[2]; + cg_paused->modified = false; + } + float viewangles[3]{}; viewangles[0] = angle_normalize((cmd.angles[0] * 0.000021457672f) + ps->delta_angles[0]); viewangles[1] = angle_normalize((cmd.angles[1] * 0.000021457672f) + ps->delta_angles[1]); diff --git a/src/client/component/fps.cpp b/src/client/component/fps.cpp index 0f08d293..099b4893 100644 --- a/src/client/component/fps.cpp +++ b/src/client/component/fps.cpp @@ -281,11 +281,10 @@ namespace fps } const auto font = fps_font; - const auto pos_string = utils::string::va("%f %f %f", - game::g_entities[0].origin[0], - game::g_entities[0].origin[1], - game::g_entities[0].origin[2]); + game::refdef->org[0], + game::refdef->org[1], + game::refdef->org[2]); const auto x = screen_max[0] - 15.f - game::R_TextWidth(pos_string, 0x7FFFFFFF, font);