Get the current game once when injecting

This commit is contained in:
8dcc 2023-07-28 15:44:31 +02:00
parent 418f1afaca
commit 3e28c655ea
1 changed files with 4 additions and 0 deletions

View File

@ -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;