diff options
-rw-r--r-- | NorthstarDLL/audio.cpp | 6 | ||||
-rw-r--r-- | NorthstarDLL/debugoverlay.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/dedicated.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/dedicated.h | 2 | ||||
-rw-r--r-- | NorthstarDLL/hooks.cpp | 4 | ||||
-rw-r--r-- | NorthstarDLL/logging.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/miscclientfixes.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/miscserverscript.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/rpakfilesystem.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/serverauthentication.cpp | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/NorthstarDLL/audio.cpp b/NorthstarDLL/audio.cpp index ed30d01b..6d52a071 100644 --- a/NorthstarDLL/audio.cpp +++ b/NorthstarDLL/audio.cpp @@ -265,7 +265,7 @@ EventOverrideData::EventOverrideData(const std::string& data, const fs::path& pa bool CustomAudioManager::TryLoadAudioOverride(const fs::path& defPath) { - if (IsDedicated()) + if (IsDedicatedServer()) return true; // silently fail std::ifstream jsonStream(defPath); @@ -308,7 +308,7 @@ MilesStopAll_Type MilesStopAll; void CustomAudioManager::ClearAudioOverrides() { - if (IsDedicated()) + if (IsDedicatedServer()) return; if (m_loadedAudioOverrides.size() > 0 || m_loadedAudioOverridesRegex.size() > 0) @@ -497,7 +497,7 @@ void InitialiseMilesAudioHooks(HMODULE baseAddress) { Cvar_ns_print_played_sounds = new ConVar("ns_print_played_sounds", "0", FCVAR_NONE, ""); - if (IsDedicated()) + if (IsDedicatedServer()) return; uintptr_t milesAudioBase = (uintptr_t)GetModuleHandleA("mileswin64.dll"); diff --git a/NorthstarDLL/debugoverlay.cpp b/NorthstarDLL/debugoverlay.cpp index dec7353e..96da2f38 100644 --- a/NorthstarDLL/debugoverlay.cpp +++ b/NorthstarDLL/debugoverlay.cpp @@ -153,7 +153,7 @@ void __fastcall DrawOverlayHook(OverlayBase_t* pOverlay) void InitialiseDebugOverlay(HMODULE baseAddress) { - if (IsDedicated()) + if (IsDedicatedServer()) return; HookEnabler hook; diff --git a/NorthstarDLL/dedicated.cpp b/NorthstarDLL/dedicated.cpp index f9e315d3..d2a89f6a 100644 --- a/NorthstarDLL/dedicated.cpp +++ b/NorthstarDLL/dedicated.cpp @@ -5,7 +5,7 @@ #include "serverauthentication.h" #include "masterserver.h" -bool IsDedicated() +bool IsDedicatedServer() { static bool result = strstr(GetCommandLineA(), "-dedicated"); return result; diff --git a/NorthstarDLL/dedicated.h b/NorthstarDLL/dedicated.h index 51630025..0a2d247e 100644 --- a/NorthstarDLL/dedicated.h +++ b/NorthstarDLL/dedicated.h @@ -1,6 +1,6 @@ #pragma once -bool IsDedicated(); +bool IsDedicatedServer(); void InitialiseDedicated(HMODULE moduleAddress); void InitialiseDedicatedOrigin(HMODULE baseAddress); diff --git a/NorthstarDLL/hooks.cpp b/NorthstarDLL/hooks.cpp index 64099f48..7f1d3b84 100644 --- a/NorthstarDLL/hooks.cpp +++ b/NorthstarDLL/hooks.cpp @@ -134,7 +134,7 @@ void AddDllLoadCallback(std::string dll, DllLoadCallbackFuncType callback) void AddDllLoadCallbackForDedicatedServer(std::string dll, DllLoadCallbackFuncType callback) { - if (!IsDedicated()) + if (!IsDedicatedServer()) return; DllLoadCallback* callbackStruct = new DllLoadCallback; @@ -147,7 +147,7 @@ void AddDllLoadCallbackForDedicatedServer(std::string dll, DllLoadCallbackFuncTy void AddDllLoadCallbackForClient(std::string dll, DllLoadCallbackFuncType callback) { - if (IsDedicated()) + if (IsDedicatedServer()) return; DllLoadCallback* callbackStruct = new DllLoadCallback; diff --git a/NorthstarDLL/logging.cpp b/NorthstarDLL/logging.cpp index 38430c76..fe340b29 100644 --- a/NorthstarDLL/logging.cpp +++ b/NorthstarDLL/logging.cpp @@ -203,7 +203,7 @@ long __stdcall ExceptionFilter(EXCEPTION_POINTERS* exceptionInfo) else spdlog::error("Failed to write minidump file {}!", stream.str()); - if (!IsDedicated()) + if (!IsDedicatedServer()) MessageBoxA( 0, "Northstar has crashed! Crash info can be found in R2Northstar/logs", "Northstar has crashed!", MB_ICONERROR | MB_OK); } diff --git a/NorthstarDLL/miscclientfixes.cpp b/NorthstarDLL/miscclientfixes.cpp index 888012f1..fc57d534 100644 --- a/NorthstarDLL/miscclientfixes.cpp +++ b/NorthstarDLL/miscclientfixes.cpp @@ -27,7 +27,7 @@ void* CrashingWeaponActivityFunc1Hook(void* a1) void InitialiseMiscClientFixes(HMODULE baseAddress) { - if (IsDedicated()) + if (IsDedicatedServer()) return; HookEnabler hook; diff --git a/NorthstarDLL/miscserverscript.cpp b/NorthstarDLL/miscserverscript.cpp index 45ab201f..c371da81 100644 --- a/NorthstarDLL/miscserverscript.cpp +++ b/NorthstarDLL/miscserverscript.cpp @@ -62,7 +62,7 @@ SQRESULT SQ_IsPlayerIndexLocalPlayer(void* sqvm) SQRESULT SQ_IsDedicated(void* sqvm) { - ServerSq_pushbool(sqvm, IsDedicated()); + ServerSq_pushbool(sqvm, IsDedicatedServer()); return SQRESULT_NOTNULL; } diff --git a/NorthstarDLL/rpakfilesystem.cpp b/NorthstarDLL/rpakfilesystem.cpp index cb069b56..964042b5 100644 --- a/NorthstarDLL/rpakfilesystem.cpp +++ b/NorthstarDLL/rpakfilesystem.cpp @@ -219,7 +219,7 @@ int LoadPakAsyncHook(char* path, void* unknownSingleton, int flags, void* callba // do this after custom paks load and in bShouldLoadPaks so we only ever call this on the root pakload call // todo: could probably add some way to flag custom paks to not be loaded on dedicated servers in rpak.json - if (IsDedicated() && strncmp(path, "common", 6)) // dedicated only needs common and common_mp + if (IsDedicatedServer() && strncmp(path, "common", 6)) // dedicated only needs common and common_mp return -1; } diff --git a/NorthstarDLL/serverauthentication.cpp b/NorthstarDLL/serverauthentication.cpp index e66fac3c..463bd0ba 100644 --- a/NorthstarDLL/serverauthentication.cpp +++ b/NorthstarDLL/serverauthentication.cpp @@ -524,7 +524,7 @@ char CGameClient__ExecuteStringCommandHook(void* self, uint32_t unknown, const c if (command && !command->IsFlagSet(FCVAR_CLIENTCMD_CAN_EXECUTE)) { // ensure FCVAR_GAMEDLL concommands without FCVAR_CLIENTCMD_CAN_EXECUTE can't be executed by remote clients - if (IsDedicated()) + if (IsDedicatedServer()) return false; if (strcmp((char*)self + 0xF500, g_LocalPlayerUserID)) |