Get the current game once when injecting
This commit is contained in:
@ -7,6 +7,7 @@
|
|||||||
#include "include/globals.h"
|
#include "include/globals.h"
|
||||||
#include "include/cvars.h"
|
#include "include/cvars.h"
|
||||||
#include "include/hooks.h"
|
#include "include/hooks.h"
|
||||||
|
#include "include/util.h"
|
||||||
|
|
||||||
static bool loaded = false;
|
static bool loaded = false;
|
||||||
|
|
||||||
@ -35,6 +36,9 @@ void load(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get game version after injecting */
|
||||||
|
this_game_id = get_cur_game();
|
||||||
|
|
||||||
i_engine->pfnClientCmd("echo \"hl-cheat loaded successfully!\"");
|
i_engine->pfnClientCmd("echo \"hl-cheat loaded successfully!\"");
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
Reference in New Issue
Block a user