diff --git a/Warp.rbxm b/Warp.rbxm index f3bc695..31dcc63 100644 Binary files a/Warp.rbxm and b/Warp.rbxm differ diff --git a/aftman.toml b/aftman.toml index 30f6d4b..04cb678 100644 --- a/aftman.toml +++ b/aftman.toml @@ -3,5 +3,5 @@ # To add a new tool, add an entry to this table. [tools] -rojo = "rojo-rbx/rojo@7.2.1" +rojo = "rojo-rbx/rojo@7.3.0" wally = "UpliftGames/wally@0.3.2" diff --git a/src/Index/Server/ServerProcess.luau b/src/Index/Server/ServerProcess.luau index 8267926..c97aa87 100644 --- a/src/Index/Server/ServerProcess.luau +++ b/src/Index/Server/ServerProcess.luau @@ -108,7 +108,7 @@ end function ServerProcess.add(Identifier: string, originId: string, ratelimit: Type.rateLimitArg) if not serverQueue[Identifier] then - RateLimit.create(originId, ratelimit.maxEntrance, ratelimit.interval) + RateLimit.create(originId, ratelimit.maxEntrance or 200, ratelimit.interval or 2) serverQueue[Identifier] = {} unreliableServerQueue[Identifier] = {} serverCallback[Identifier] = {} @@ -119,6 +119,10 @@ function ServerProcess.add(Identifier: string, originId: string, ratelimit: Type queueInRequest[2][Identifier] = {} queueOutRequest[1][Identifier] = {} queueOutRequest[2][Identifier] = {} + + for _, player: Player in ipairs(Players:GetPlayers()) do + task.spawn(initializeEachPlayer, player) + end end end diff --git a/src/Index/init.luau b/src/Index/init.luau index 2b97f11..eccb962 100644 --- a/src/Index/init.luau +++ b/src/Index/init.luau @@ -17,10 +17,10 @@ else require(Client.ClientProcess).start() end -function Index.Server(Identifier: string): Type.Server +function Index.Server(Identifier: string, rateLimit: Type.rateLimitArg?): Type.Server Assert(IsServer, `[Warp]: Calling .Server({Identifier}) on client side (expected server side)`) Assert(typeof(Identifier) == "string", "[Warp]: Identifier must be a string type") - return require(Server.Index)(Identifier) :: Type.Server + return require(Server.Index)(Identifier, rateLimit) :: Type.Server end function Index.Client(Identifier: string): Type.Client Assert(not IsServer, `[Warp]: Calling .Client({Identifier}) on server side (expected client side)`) diff --git a/wally.toml b/wally.toml index 75b480e..f6c45f2 100644 --- a/wally.toml +++ b/wally.toml @@ -1,6 +1,6 @@ [package] name = "imezx/warp" -version = "1.0.0" +version = "1.0.1" registry = "https://github.com/UpliftGames/wally-index" realm = "shared" license = "MIT"