easy-games / chickynoid

A server-authoritative networking character controller for Roblox.
https://easy-games.github.io/chickynoid/
MIT License
221 stars 31 forks source link

Clamping the serverTime commands can contain, to prevent lagging out the server #40

Open GoodGithubAccount opened 6 months ago

GoodGithubAccount commented 6 months ago

Clients can currently send whatever serverTime they wish in their commands. If a client repeatedly sends a number that's higher than the serverSimulationTime, the server lags out and the antilag module errors.

I've simply clamped the serverTime received from players to prevent this, and changed the serverTime that bots send to be the serverSimulationTime instead of tick.