mirror of
https://github.com/gmod-integration/lua.git
synced 2025-04-29 22:15:26 +00:00
fix: forgot to save ply fps + remove a net call every sec
This commit is contained in:
parent
09727be01b
commit
60551eee07
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user