From a89856324916a003b79bd6ad786d72d3647f95f1 Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Wed, 20 Sep 2023 15:50:57 -0400 Subject: [PATCH] Remove get_cur_game and references to it --- src/main.c | 1 - src/util.c | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/src/main.c b/src/main.c index 2f7f0c2..c1aa4f0 100644 --- a/src/main.c +++ b/src/main.c @@ -38,7 +38,6 @@ void load(void) { } /* Get game version after injecting */ - //this_game_id = get_cur_game(); if (IsCS16()) { i_engine->pfnClientCmd("play 'sound/radio/go.wav'"); diff --git a/src/util.c b/src/util.c index 26ecef7..3849a41 100644 --- a/src/util.c +++ b/src/util.c @@ -70,26 +70,6 @@ char* get_name(int ent_idx) { return info.name; } -game_id get_cur_game(void) { - typedef void (*COM_ParseDirectoryFromCmd_t)(const char*, char*, int, - const char*); - COM_ParseDirectoryFromCmd_t COM_ParseDirectoryFromCmd = - (COM_ParseDirectoryFromCmd_t)dlsym(hw, "COM_ParseDirectoryFromCmd"); - - char game[FILENAME_MAX]; - COM_ParseDirectoryFromCmd("-game", game, sizeof(game), "valve"); - - /* Get the current game we are playing */ - if (game[0] == 'c' && game[1] == 's') /* cstrike */ - return CS; - else if (*game == 'd') /* dod */ - return DOD; - else if (*game == 't') /* tfc */ - return TF; - else - return HL; -} - vec3_t vec3(float x, float y, float z) { vec3_t ret;