Skip to content

Commit

Permalink
actually fix CallAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdotink committed Dec 5, 2023
1 parent e864f82 commit 80e2a7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions lib/Net/Client.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion lib/Net/Server.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80e2a7e

Please sign in to comment.