diff --git a/RageCoop.Client/Networking/Networking.cs b/RageCoop.Client/Networking/Networking.cs
index aa9fdfa..6378ddf 100644
--- a/RageCoop.Client/Networking/Networking.cs
+++ b/RageCoop.Client/Networking/Networking.cs
@@ -173,7 +173,7 @@ namespace RageCoop.Client
}
}
- private static void DecodeNativeResponse(Packets.NativeResponse packet)
+ private static void DecodeNativeCallWithResponse(Packets.NativeResponse packet)
{
object result = DecodeNativeCall(packet.Hash, packet.Args, true, packet.ResultType);
diff --git a/RageCoop.Client/Networking/Receive.cs b/RageCoop.Client/Networking/Receive.cs
index 0c81ade..225e65f 100644
--- a/RageCoop.Client/Networking/Receive.cs
+++ b/RageCoop.Client/Networking/Receive.cs
@@ -192,7 +192,7 @@ namespace RageCoop.Client
Packets.NativeCall packet = new Packets.NativeCall();
packet.Unpack(data);
- DecodeNativeCall(packet.Hash, packet.Args, false);
+ Main.QueueAction(() => { DecodeNativeCall(packet.Hash, packet.Args, false); });
}
break;
@@ -202,7 +202,7 @@ namespace RageCoop.Client
Packets.NativeResponse packet = new Packets.NativeResponse();
packet.Unpack(data);
- DecodeNativeResponse(packet);
+ DecodeNativeCallWithResponse(packet);
}
break;
diff --git a/RageCoop.Server/Client.cs b/RageCoop.Server/Client.cs
index 681ad56..b754bc1 100644
--- a/RageCoop.Server/Client.cs
+++ b/RageCoop.Server/Client.cs
@@ -89,6 +89,11 @@ namespace RageCoop.Server
}
}
+ ///
+ /// Send a native call to client and ignore its return value.
+ ///
+ /// The function's hash
+ /// Arguments
public void SendNativeCall(ulong hash, params object[] args)
{
try
@@ -121,8 +126,14 @@ namespace RageCoop.Server
Program.Logger.Error($">> {e.Message} <<>> {e.Source ?? string.Empty} <<>> {e.StackTrace ?? string.Empty} <<");
}
}
-
- public void SendNativeResponse(Action