aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/plugins.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-15 00:04:33 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-15 00:04:33 +0000
commit96aa95aede1fb1f3fde3d2c08728c37520bea4c2 (patch)
tree6ef9b43cab5e215a05fabf0bd197dc3a0593c525 /NorthstarDedicatedTest/plugins.cpp
parent5df2346ba1414fd43d80fc2919c2f880b7f8aeaf (diff)
downloadNorthstarLauncher-96aa95aede1fb1f3fde3d2c08728c37520bea4c2.tar.gz
NorthstarLauncher-96aa95aede1fb1f3fde3d2c08728c37520bea4c2.zip
move to using g_pCVar more
Diffstat (limited to 'NorthstarDedicatedTest/plugins.cpp')
-rw-r--r--NorthstarDedicatedTest/plugins.cpp38
1 files changed, 21 insertions, 17 deletions
diff --git a/NorthstarDedicatedTest/plugins.cpp b/NorthstarDedicatedTest/plugins.cpp
index 383555cf..b725a5a8 100644
--- a/NorthstarDedicatedTest/plugins.cpp
+++ b/NorthstarDedicatedTest/plugins.cpp
@@ -390,21 +390,25 @@ void InitialisePluginCommands(HMODULE baseAddress)
// i swear there's a way to make this not have be run in 2 contexts but i can't figure it out
// some funcs i need are just not available in UI or CLIENT
- g_UISquirrelManager->AddFuncRegistration(
- "void", "NSUpdateGameStateUI", "string gamemode, string gamemodeName, string map, string mapName, bool connected, bool loading", "",
- SQ_UpdateGameStateUI);
- g_ClientSquirrelManager->AddFuncRegistration(
- "void", "NSUpdateGameStateClient",
- "int playerCount, int outScore, int secondHighestScore, int highestScore, bool roundBased, int scoreLimit", "",
- SQ_UpdateGameStateClient);
- g_UISquirrelManager->AddFuncRegistration(
- "void", "NSUpdateServerInfo",
- "string id, string name, string password, int players, int maxPlayers, string map, string mapDisplayName, string playlist, string "
- "playlistDisplayName",
- "", SQ_UpdateServerInfo);
- g_ClientSquirrelManager->AddFuncRegistration(
- "void", "NSUpdateServerInfoReload", "int maxPlayers", "", SQ_UpdateServerInfoBetweenRounds);
- g_ClientSquirrelManager->AddFuncRegistration("void", "NSUpdateTimeInfo", "float timeInFuture", "", SQ_UpdateTimeInfo);
- g_UISquirrelManager->AddFuncRegistration("void", "NSSetLoading", "bool loading", "", SQ_SetConnected);
- g_UISquirrelManager->AddFuncRegistration("void", "NSUpdateListenServer", "", "", SQ_UpdateListenServer);
+ if (g_UISquirrelManager && g_ClientSquirrelManager)
+ {
+ g_UISquirrelManager->AddFuncRegistration(
+ "void", "NSUpdateGameStateUI", "string gamemode, string gamemodeName, string map, string mapName, bool connected, bool loading",
+ "", SQ_UpdateGameStateUI);
+ g_ClientSquirrelManager->AddFuncRegistration(
+ "void", "NSUpdateGameStateClient",
+ "int playerCount, int outScore, int secondHighestScore, int highestScore, bool roundBased, int scoreLimit", "",
+ SQ_UpdateGameStateClient);
+ g_UISquirrelManager->AddFuncRegistration(
+ "void", "NSUpdateServerInfo",
+ "string id, string name, string password, int players, int maxPlayers, string map, string mapDisplayName, string playlist, "
+ "string "
+ "playlistDisplayName",
+ "", SQ_UpdateServerInfo);
+ g_ClientSquirrelManager->AddFuncRegistration(
+ "void", "NSUpdateServerInfoReload", "int maxPlayers", "", SQ_UpdateServerInfoBetweenRounds);
+ g_ClientSquirrelManager->AddFuncRegistration("void", "NSUpdateTimeInfo", "float timeInFuture", "", SQ_UpdateTimeInfo);
+ g_UISquirrelManager->AddFuncRegistration("void", "NSSetLoading", "bool loading", "", SQ_SetConnected);
+ g_UISquirrelManager->AddFuncRegistration("void", "NSUpdateListenServer", "", "", SQ_UpdateListenServer);
+ }
}