From 3e28c655ea578ca5936552a9f319a742dcf3cbb4 Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Fri, 28 Jul 2023 15:44:31 +0200 Subject: [PATCH] Get the current game once when injecting --- src/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.c b/src/main.c index 92e5756..4639e41 100644 --- a/src/main.c +++ b/src/main.c @@ -7,6 +7,7 @@ #include "include/globals.h" #include "include/cvars.h" #include "include/hooks.h" +#include "include/util.h" static bool loaded = false; @@ -35,6 +36,9 @@ void load(void) { return; } + /* Get game version after injecting */ + this_game_id = get_cur_game(); + i_engine->pfnClientCmd("echo \"hl-cheat loaded successfully!\""); loaded = true;