fix: forgot to save ply fps + remove a net call every sec

This commit is contained in:
Linventif 2025-04-24 09:28:39 +00:00
parent 09727be01b
commit 60551eee07
2 changed files with 7 additions and 1 deletions

View File

@ -26,7 +26,7 @@ local netReceive = {
RunConsoleCommand("changelevel", game.GetMap())
end,
["verifyMe"] = function(ply) gmInte.verifyPlayer(ply) end,
["sendFPS"] = function(ply, data) gmInte.sendPlayerToken(ply) end
["sendFPS"] = function(ply, data) ply:gmInteSetFPS(fps) end,
}
net.Receive("gmIntegration", function(len, ply)

View File

@ -84,6 +84,12 @@ function ply:gmIntGetFPS()
return self.gmIntFPS || 0
end
function ply:gmInteSetFPS(fps)
fps = tonumber(fps || 0)
fps = math.Clamp(fps, 0, 1000)
self.gmIntFPS = fps
end
gmInte.restoreFileCache = gmInte.restoreFileCache || {}
function ply:getAdjustedTime()
if gmInte.restoreFileCache == nil || gmInte.restoreFileCache.sysTime == nil || gmInte.restoreFileCache.playersList == nil then return 0 end