From 4a3d8c32523491d3aef004462871efa44f7fe084 Mon Sep 17 00:00:00 2001 From: Federico Cecchetto Date: Tue, 30 Aug 2022 02:23:07 +0200 Subject: [PATCH] Fix cg_gamemessage --- src/client/component/command.cpp | 16 ++++++++-------- src/client/component/mods.cpp | 4 ++-- src/client/game/symbols.hpp | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/client/component/command.cpp b/src/client/component/command.cpp index ac5f709d..e6336139 100644 --- a/src/client/component/command.cpp +++ b/src/client/component/command.cpp @@ -248,7 +248,7 @@ namespace command game::CG_GameMessage(0, utils::string::va("godmode %s", game::g_entities[0].flags & game::FL_GODMODE ? "^2on" - : "^1off")); + : "^1off"), 0); }); add("demigod", []() @@ -262,7 +262,7 @@ namespace command game::CG_GameMessage(0, utils::string::va("demigod mode %s", game::g_entities[0].flags & game::FL_DEMI_GODMODE ? "^2on" - : "^1off")); + : "^1off"), 0); }); add("notarget", []() @@ -276,7 +276,7 @@ namespace command game::CG_GameMessage(0, utils::string::va("notarget %s", game::g_entities[0].flags & game::FL_NOTARGET ? "^2on" - : "^1off")); + : "^1off"), 0); }); add("noclip", []() @@ -290,7 +290,7 @@ namespace command game::CG_GameMessage(0, utils::string::va("noclip %s", game::g_entities[0].client->flags & 1 ? "^2on" - : "^1off")); + : "^1off"), 0); }); add("ufo", []() @@ -302,7 +302,7 @@ namespace command game::g_entities[0].client->flags ^= 2; game::CG_GameMessage( - 0, utils::string::va("ufo %s", game::g_entities[0].client->flags & 2 ? "^2on" : "^1off")); + 0, utils::string::va("ufo %s", game::g_entities[0].client->flags & 2 ? "^2on" : "^1off"), 0); }); add("give", [](const params& params) @@ -314,7 +314,7 @@ namespace command if (params.size() < 2) { - game::CG_GameMessage(0, "You did not specify a weapon name"); + game::CG_GameMessage(0, "You did not specify a weapon name", 0); return; } @@ -379,7 +379,7 @@ namespace command } else { - game::CG_GameMessage(0, "Weapon does not exist"); + game::CG_GameMessage(0, "Weapon does not exist", 0); } } } @@ -419,7 +419,7 @@ namespace command if (params.size() < 2) { - game::CG_GameMessage(0, "You did not specify a weapon name"); + game::CG_GameMessage(0, "You did not specify a weapon name", 0); return; } diff --git a/src/client/component/mods.cpp b/src/client/component/mods.cpp index 3349fca5..01ede170 100644 --- a/src/client/component/mods.cpp +++ b/src/client/component/mods.cpp @@ -93,7 +93,7 @@ namespace mods if (!game::Com_InFrontend()) { console::error("Cannot load mod while in-game!\n"); - game::CG_GameMessage(0, "^1Cannot unload mod while in-game!"); + game::CG_GameMessage(0, "^1Cannot unload mod while in-game!", 0); return; } @@ -132,7 +132,7 @@ namespace mods if (!game::Com_InFrontend()) { console::error("Cannot unload mod while in-game!\n"); - game::CG_GameMessage(0, "^1Cannot unload mod while in-game!"); + game::CG_GameMessage(0, "^1Cannot unload mod while in-game!", 0); return; } diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 1952f045..dd3a280f 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -18,7 +18,7 @@ namespace game WEAK symbol Cbuf_AddText{0x14059A050}; - WEAK symbol CG_GameMessage{0x14037F450}; + WEAK symbol CG_GameMessage{0x14037F450}; WEAK symbol CG_GameMessageBold{0x14037F1B0}; WEAK symbol CG_GetWeaponDisplayName{0x1403B9210}; @@ -48,6 +48,7 @@ namespace game WEAK symbol DB_GetXAssetTypeSize{0x1403E40D0}; WEAK symbol DB_LevelLoadAddZone{0x1404145D0}; + WEAK symbol DB_IsXAssetDefault{0x1404143C0}; WEAK symbol Dvar_FindVar{0x140618F90}; WEAK symbol Dvar_FindMalleableVar{0x140618F00};