Add cvars_init() call to main

This commit is contained in:
8dcc 2023-07-21 13:44:53 +02:00
parent ad7b8b7615
commit 083778fad0
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include "include/main.h"
#include "include/sdk.h"
#include "include/globals.h"
#include "include/cvars.h"
#include "include/hooks.h"
static bool loaded = false;
@ -24,6 +25,13 @@ __attribute__((constructor)) void load(void) {
return;
}
/* Create cvars for settings */
if (!cvars_init()) {
fprintf(stderr, "hl-cheat: load: error creating cvars, aborting\n");
self_unload();
return;
}
/* Hook functions */
if (!hooks_init()) {
fprintf(stderr, "hl-cheat: load: error hooking functions, aborting\n");