mirror of
https://github.com/gmod-integration/lua.git
synced 2025-05-02 16:45: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())
|
RunConsoleCommand("changelevel", game.GetMap())
|
||||||
end,
|
end,
|
||||||
["verifyMe"] = function(ply) gmInte.verifyPlayer(ply) 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)
|
net.Receive("gmIntegration", function(len, ply)
|
||||||
|
|
|
@ -84,6 +84,12 @@ function ply:gmIntGetFPS()
|
||||||
return self.gmIntFPS || 0
|
return self.gmIntFPS || 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ply:gmInteSetFPS(fps)
|
||||||
|
fps = tonumber(fps || 0)
|
||||||
|
fps = math.Clamp(fps, 0, 1000)
|
||||||
|
self.gmIntFPS = fps
|
||||||
|
end
|
||||||
|
|
||||||
gmInte.restoreFileCache = gmInte.restoreFileCache || {}
|
gmInte.restoreFileCache = gmInte.restoreFileCache || {}
|
||||||
function ply:getAdjustedTime()
|
function ply:getAdjustedTime()
|
||||||
if gmInte.restoreFileCache == nil || gmInte.restoreFileCache.sysTime == nil || gmInte.restoreFileCache.playersList == nil then return 0 end
|
if gmInte.restoreFileCache == nil || gmInte.restoreFileCache.sysTime == nil || gmInte.restoreFileCache.playersList == nil then return 0 end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user