From 80e2a7ed41345d81f6cc18cac164b2fda0c346e0 Mon Sep 17 00:00:00 2001 From: jackdotink Date: Tue, 5 Dec 2023 15:59:27 -0600 Subject: [PATCH] actually fix CallAsync --- lib/Net/Client.luau | 15 ++------------- lib/Net/Server.luau | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/lib/Net/Client.luau b/lib/Net/Client.luau index c5e2cab..740fe16 100644 --- a/lib/Net/Client.luau +++ b/lib/Net/Client.luau @@ -68,13 +68,13 @@ local function Start() if CallThread then CallMap[CallId] = nil - coroutine.resume(CallThread, table.unpack(CallList)) + coroutine.resume(CallThread, CallList) end end end end) - UnreliableRemote.OnClientEvent:Connect(function(IncomingFireSection, IncomingCallSection) + UnreliableRemote.OnClientEvent:Connect(function(IncomingFireSection) if IncomingFireSection then for EventId, CallList in IncomingFireSection do local Listener = ListenerMap[EventId] @@ -86,17 +86,6 @@ local function Start() end end end - - if IncomingCallSection then - for CallId, CallList in IncomingCallSection do - local CallThread = CallMap[CallId] - - if CallThread then - coroutine.resume(CallThread, CallList) - CallMap[CallId] = nil - end - end - end end) RunService.Heartbeat:Connect(function() diff --git a/lib/Net/Server.luau b/lib/Net/Server.luau index d87fa7c..b635541 100644 --- a/lib/Net/Server.luau +++ b/lib/Net/Server.luau @@ -104,7 +104,7 @@ local function Start() end end) - UnreliableRemote.OnServerEvent:Connect(function(Player, IncomingFireSection, IncomingCallSection) + UnreliableRemote.OnServerEvent:Connect(function(Player, IncomingFireSection) local FireSectionValid, FireSection = FireSectionCheck(IncomingFireSection) if FireSectionValid then