mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Fix PackedRatio
This commit is contained in:
@@ -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.Round(value*1000) then return end
|
||||||
self:SetNW2Int(idx,math.floor(value*500))
|
self:SetNW2Int(idx,math.Round(value*1000))
|
||||||
end
|
end
|
||||||
|
|
||||||
function ENT:GetPackedRatio(idx)
|
function ENT:GetPackedRatio(idx)
|
||||||
return self:GetNW2Int(idx)/500
|
return self:GetNW2Int(idx)/1000
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user