aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.Client/mod.json5
-rw-r--r--Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut9
-rw-r--r--Northstar.CustomServers/mod.json10
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_custom_codecallbacks.gnut9
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/sh_server_to_client_stringcommands.gnut7
5 files changed, 11 insertions, 29 deletions
diff --git a/Northstar.Client/mod.json b/Northstar.Client/mod.json
index 15853be7..3b236980 100644
--- a/Northstar.Client/mod.json
+++ b/Northstar.Client/mod.json
@@ -46,10 +46,7 @@
"Scripts": [
{
"Path": "_custom_codecallbacks_client.gnut",
- "RunOn": "CLIENT",
- "ClientCallback": {
- "Before": "NSSetupChathooksClient"
- }
+ "RunOn": "CLIENT"
},
{
"Path": "client/cl_chat.gnut",
diff --git a/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut b/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut
index 3caf4336..811874c5 100644
--- a/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut
+++ b/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut
@@ -1,7 +1,10 @@
untyped
global function AddCallback_OnReceivedSayTextMessage
-global function NSSetupChathooksClient
+
+// this is global due to squirrel bridge v3 making native not be able to find non-global funcs properly
+// temp fix (surely it will get replaced), do not use this function please (although there isnt rly a downside to it?)
+global function CHudChat_ProcessMessageStartThread
global struct ClClient_MessageStruct {
string message
@@ -135,7 +138,3 @@ void function AddCallback_OnReceivedSayTextMessage( ClClient_MessageStruct funct
{
NsCustomCallbacksClient.OnReceivedSayTextMessageCallbacks.append(callbackFunc)
}
-
-void function NSSetupChathooksClient() {
- getroottable().rawset("CHudChat_ProcessMessageStartThread", CHudChat_ProcessMessageStartThread)
-}
diff --git a/Northstar.CustomServers/mod.json b/Northstar.CustomServers/mod.json
index 2ed89910..f67aeb19 100644
--- a/Northstar.CustomServers/mod.json
+++ b/Northstar.CustomServers/mod.json
@@ -58,10 +58,7 @@
"Scripts": [
{
"Path": "_custom_codecallbacks.gnut",
- "RunOn": "SERVER",
- "ServerCallback": {
- "Before": "NSSetupChathooksServer"
- }
+ "RunOn": "SERVER"
},
{
"Path": "_northstar_cheatcommands.nut",
@@ -104,10 +101,7 @@
},
{
"Path": "sh_server_to_client_stringcommands.gnut",
- "RunOn": "CLIENT || SERVER",
- "ClientCallback": {
- "After": "ServerToClientStringCommands_Init"
- }
+ "RunOn": "CLIENT || SERVER"
},
{
"Path": "gamemodes/_gamemode_fra.nut",
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_custom_codecallbacks.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_custom_codecallbacks.gnut
index 4a7f8189..ee21116d 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_custom_codecallbacks.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_custom_codecallbacks.gnut
@@ -1,7 +1,10 @@
untyped
global function AddCallback_OnReceivedSayTextMessage
-global function NSSetupChathooksServer
+
+// this is global due to squirrel bridge v3 making native not be able to find non-global funcs properly
+// temp fix (surely it will get replaced), do not use this function please
+global function CServerGameDLL_ProcessMessageStartThread
global struct ClServer_MessageStruct {
string message
@@ -53,7 +56,3 @@ void function AddCallback_OnReceivedSayTextMessage( ClServer_MessageStruct funct
{
NsCustomCallbacks.OnReceivedSayTextMessageCallbacks.append(callbackFunc)
}
-
-void function NSSetupChathooksServer() {
- getroottable().rawset("CServerGameDLL_ProcessMessageStartThread", CServerGameDLL_ProcessMessageStartThread)
-}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_server_to_client_stringcommands.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_server_to_client_stringcommands.gnut
index a51e528f..18df6a6f 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/sh_server_to_client_stringcommands.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_server_to_client_stringcommands.gnut
@@ -1,6 +1,4 @@
#if CLIENT
-global function ServerToClientStringCommands_Init
-
global function AddServerToClientStringCommandCallback
global function NSClientCodeCallback_RecievedServerToClientStringCommand
#endif
@@ -14,11 +12,6 @@ struct {
table< string, array< void functionref( array<string> args ) > > callbacks
} file
-void function ServerToClientStringCommands_Init()
-{
- getroottable().rawset( "NSClientCodeCallback_RecievedServerToClientStringCommand", NSClientCodeCallback_RecievedServerToClientStringCommand )
-}
-
void function AddServerToClientStringCommandCallback( string command, void functionref( array<string> args ) callback )
{
if ( !( command in file.callbacks ) )