From 147089f8df5e66501a48d3a0f28585f776bc2ce6 Mon Sep 17 00:00:00 2001
From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>
Date: Tue, 23 Aug 2022 11:49:13 +0200
Subject: [PATCH] Fix mp_gamemode not working on dedicated server when launched
 as retail

Put in !DEDICATED by accident.
---
 r5dev/tier1/IConVar.cpp  | 2 +-
 r5dev/vstdlib/callback.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/r5dev/tier1/IConVar.cpp b/r5dev/tier1/IConVar.cpp
index 4a5b8afe..7b28ff2a 100644
--- a/r5dev/tier1/IConVar.cpp
+++ b/r5dev/tier1/IConVar.cpp
@@ -256,8 +256,8 @@ void ConVar::InitShipped(void) const
 	cl_threaded_bone_setup->RemoveFlags(FCVAR_DEVELOPMENTONLY);
 	rui_defaultDebugFontFace->RemoveFlags(FCVAR_DEVELOPMENTONLY);
 	origin_disconnectWhenOffline->RemoveFlags(FCVAR_DEVELOPMENTONLY);
-	mp_gamemode->RemoveFlags(FCVAR_DEVELOPMENTONLY);
 #endif // !DEDICATED
+	mp_gamemode->RemoveFlags(FCVAR_DEVELOPMENTONLY);
 	mp_gamemode->RemoveChangeCallback(mp_gamemode->m_fnChangeCallbacks[0]);
 	mp_gamemode->InstallChangeCallback(MP_GameMode_Changed_f, false);
 }
diff --git a/r5dev/vstdlib/callback.h b/r5dev/vstdlib/callback.h
index 4b3ee2cb..a560bc38 100644
--- a/r5dev/vstdlib/callback.h
+++ b/r5dev/vstdlib/callback.h
@@ -81,9 +81,9 @@ class VCallback : public IDetour
 #endif
 		p_DownloadPlaylists_f = g_GameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x33\xC9\xC6\x05\x00\x00\x00\x00\x00\xE9\x00\x00\x00\x00"), "xxxx?????x????");
 
-		SetupGamemode = p_SetupGamemode.RCast<bool(*)(const char*)>();
-		_Host_Map_f = p_Host_Map_f.RCast<void (*)(CCommand* pCommand, char a2)>(); /*40 55 41 56 41 57 48 81 EC ?? ?? ?? ?? 83 3D*/
-		_DownloadPlaylists_f = p_DownloadPlaylists_f.RCast<void(*)(void)>();       /*33 C9 C6 05 ?? ?? ?? ?? ?? E9 ?? ?? ?? ??*/
+		SetupGamemode = p_SetupGamemode.RCast<bool(*)(const char*)>();       /*40 53 48 83 EC 20 48 8B D9 48 C7 C0 ?? ?? ?? ??*/
+		_Host_Map_f = p_Host_Map_f.RCast<void (*)(CCommand*, char)>();       /*40 55 41 56 41 57 48 81 EC ?? ?? ?? ?? 83 3D*/
+		_DownloadPlaylists_f = p_DownloadPlaylists_f.RCast<void(*)(void)>(); /*33 C9 C6 05 ?? ?? ?? ?? ?? E9 ?? ?? ?? ??*/
 	}
 	virtual void GetVar(void) const { }
 	virtual void GetCon(void) const { }