1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Merge pull request #439 from metrostroi-repo/#436

#436
This commit is contained in:
CrIcKeT98
2022-07-12 00:21:54 +03:00
committed by GitHub

View File

@@ -589,12 +589,12 @@ end
--------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------
function ENT:SetPackedRatio(idx,value) function ENT:SetPackedRatio(idx,value)
--local idx = type(idx) == "number" and 999-idx or idx --local idx = type(idx) == "number" and 999-idx or idx
if self._NetData[2][idx] ~= nil and self._NetData[2][idx] == math.floor(value*500) then return end if self._NetData[2][idx] ~= nil and self._NetData[2][idx] == math.floor(value*1000+0.5) then return end
self:SetNW2Int(idx,math.floor(value*500)) self:SetNW2Int(idx,math.floor(value*1000+0.5))
end end
function ENT:GetPackedRatio(idx) function ENT:GetPackedRatio(idx)
return self:GetNW2Int(idx)/500 return self:GetNW2Int(idx)*0.001
end end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------