fov: fix check
All checks were successful
check-formatting / check-formatting (push) Successful in 3m59s

This commit is contained in:
6arelyFuture 2025-05-21 18:45:14 +02:00
parent 8f18f193eb
commit 7678c15526
Signed by: Future
GPG Key ID: F2000F181A4F7C85

View File

@ -1,18 +1,20 @@
#include <std_include.hpp> #include <std_include.hpp>
#include "loader/component_loader.hpp" #include "loader/component_loader.hpp"
#include "game/dvars.hpp"
#include <utils/hook.hpp> #include <utils/hook.hpp>
#include <utils/string.hpp>
#include <xorstr.hpp>
namespace fov { namespace fov {
namespace { namespace {
void dvar_set_from_string_by_name_from_source(const char* dvar_name, void dvar_set_from_string_by_name_from_source(const char* dvar_name,
const char* string, const char* string,
game::DvarSetSource source) { game::DvarSetSource source) {
if ((!std::strcmp(dvar_name, "cg_fov")) || if (utils::string::compare(dvar_name, "cg_fov") ||
(!std::strcmp(dvar_name, "cg_fovScale"))) { utils::string::compare(dvar_name, "cg_fovScale")) {
game::Com_Printf(game::CON_CHANNEL_DONT_FILTER, game::Com_Printf(game::CON_CHANNEL_DONT_FILTER,
"Not allowing the client to override dvar '%s'\n", xorstr_("Not allowing the client to override dvar '%s'\n"),
dvar_name); dvar_name);
return; return;
} }