From 35ec4c665d9af0ae7173eee39da61befd9295e93 Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Tue, 7 Sep 2021 01:50:46 +0200 Subject: [PATCH] Fix build --- src/client/component/fps.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/component/fps.cpp b/src/client/component/fps.cpp index 3fdcea90..2c714b06 100644 --- a/src/client/component/fps.cpp +++ b/src/client/component/fps.cpp @@ -69,9 +69,9 @@ namespace fps return; } - const auto speed = sqrt(pow(game::g_entities[0].client->velocity[0], 2) + - pow(game::g_entities[0].client->velocity[1], 2) + - pow(game::g_entities[0].client->velocity[2], 2)); + const auto speed = (float)sqrt(pow(game::g_entities[0].client->velocity[0], 2) + + pow(game::g_entities[0].client->velocity[1], 2) + + pow(game::g_entities[0].client->velocity[2], 2)); if (cg_drawspeed->current.integer >= 1) { @@ -83,7 +83,7 @@ namespace fps const auto x = (screen_max[0] / 2) - (width / 2); const auto y = screen_max[1] - 400.f; - const auto color = speed >= 300 + const auto color = speed >= 300.f ? color_blue : fps_color_bad;