diff options
author | Maya <malte.hoermeyer@web.de> | 2022-08-23 03:54:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 02:54:54 +0100 |
commit | 4f6f182d26094b7b7512d656b5085f80e8af3dc9 (patch) | |
tree | 0a30acbb9c3f47f67887834620e5c182b7b46e09 /NorthstarDLL/serverchathooks.cpp | |
parent | 86ea43ef2c32104f92e12c80231ff9271ebeb6e2 (diff) | |
download | NorthstarLauncher-4f6f182d26094b7b7512d656b5085f80e8af3dc9.tar.gz NorthstarLauncher-4f6f182d26094b7b7512d656b5085f80e8af3dc9.zip |
Add ability to load Datatables from files (#238)
* first version of kinda working custom datatables
* Fix copy error
* Finish custom datatables
* Fix Merge
* Fix line endings
* Add fallback to rpak when ns_prefere_datatable_from_disk is true
* fix typo
* Bug fixess
* Fix Function Registration hook
* Set convar value
* Fix Client and Ui VM
* enable server auth with ms agian
* Add Filters
* FIx unused import
* Merge remote-tracking branch 'upsteam/bobs-big-refactor-pr' into datatables
Co-authored-by: RoyalBlue1 <realEmail@veryRealURL.com>
Diffstat (limited to 'NorthstarDLL/serverchathooks.cpp')
-rw-r--r-- | NorthstarDLL/serverchathooks.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDLL/serverchathooks.cpp b/NorthstarDLL/serverchathooks.cpp index b05f3dc3..a87a0034 100644 --- a/NorthstarDLL/serverchathooks.cpp +++ b/NorthstarDLL/serverchathooks.cpp @@ -54,10 +54,10 @@ void,, (CServerGameDLL* self, unsigned int senderPlayerId, const char* text, boo if (g_pSquirrel<ScriptContext::SERVER>->setupfunc("CServerGameDLL_ProcessMessageStartThread") != SQRESULT_ERROR) { - g_pSquirrel<ScriptContext::SERVER>->pushinteger(g_pSquirrel<ScriptContext::SERVER>->sqvm2, (int)senderPlayerId - 1); - g_pSquirrel<ScriptContext::SERVER>->pushstring(g_pSquirrel<ScriptContext::SERVER>->sqvm2, text); - g_pSquirrel<ScriptContext::SERVER>->pushbool(g_pSquirrel<ScriptContext::SERVER>->sqvm2, isTeam); - g_pSquirrel<ScriptContext::SERVER>->call(g_pSquirrel<ScriptContext::SERVER>->sqvm2, 3); + g_pSquirrel<ScriptContext::SERVER>->pushinteger(g_pSquirrel<ScriptContext::SERVER>->sqvm, (int)senderPlayerId - 1); + g_pSquirrel<ScriptContext::SERVER>->pushstring(g_pSquirrel<ScriptContext::SERVER>->sqvm, text); + g_pSquirrel<ScriptContext::SERVER>->pushbool(g_pSquirrel<ScriptContext::SERVER>->sqvm, isTeam); + g_pSquirrel<ScriptContext::SERVER>->call(g_pSquirrel<ScriptContext::SERVER>->sqvm, 3); } else _CServerGameDLL__OnReceivedSayTextMessage(self, senderPlayerId, text, isTeam); @@ -115,7 +115,7 @@ void ChatBroadcastMessage(int fromPlayerIndex, int toPlayerIndex, const char* te } // void function NSSendMessage( int playerIndex, string text, bool isTeam ) -SQRESULT SQ_SendMessage(void* sqvm) +SQRESULT SQ_SendMessage(HSquirrelVM* sqvm) { int playerIndex = g_pSquirrel<ScriptContext::SERVER>->getinteger(sqvm, 1); const char* text = g_pSquirrel<ScriptContext::SERVER>->getstring(sqvm, 2); @@ -127,7 +127,7 @@ SQRESULT SQ_SendMessage(void* sqvm) } // void function NSBroadcastMessage( int fromPlayerIndex, int toPlayerIndex, string text, bool isTeam, bool isDead, int messageType ) -SQRESULT SQ_BroadcastMessage(void* sqvm) +SQRESULT SQ_BroadcastMessage(HSquirrelVM* sqvm) { int fromPlayerIndex = g_pSquirrel<ScriptContext::SERVER>->getinteger(sqvm, 1); int toPlayerIndex = g_pSquirrel<ScriptContext::SERVER>->getinteger(sqvm, 2); |