1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00
This commit is contained in:
Hellss
2021-07-13 18:02:40 +03:00
committed by GitHub
parent ace123be51
commit 4a2786967d
2 changed files with 6 additions and 2 deletions

View File

@@ -1014,6 +1014,10 @@ function ENT:UpdateWagonNumber()
end
end
end
local controller = {
0,0.1,0.2,0.44,0.665,0.76,0.855
}
--------------------------------------------------------------------------------
function ENT:Think()
self.BaseClass.Think(self)
@@ -1103,7 +1107,7 @@ function ENT:Think()
-- Simulate pressure gauges getting stuck a little
self:Animate("brake",1-self:GetPackedRatio("CranePosition"),0.00, 0.48, 256,24)
self:Animate("controller",self:GetPackedRatio("ControllerPosition"),0.148, 0.333, 2,false)
self:Animate("controller",controller[self:GetNW2Int("ControllerPosition",0)+1],0.148, 0.333, 2,false)
self:Animate("reverser",self:GetPackedRatio("ReverserPosition"),0.6, 0.4, 4,false)
self:Animate("volt1",self:GetPackedRatio("BatteryVoltage"),0.62,0.495,45,3)
self:Animate("rcureverser",self:GetPackedBool("RCUPosition") and 1 or 0,0,0.5,3,false)

View File

@@ -256,7 +256,7 @@ function ENT:Think()
-- Feed packed floats
self:SetNW2Int("WrenchMode",self.KVWrenchMode)
self:SetPackedRatio("CranePosition", 1-Pneumatic.DriverValvePosition/7)
self:SetPackedRatio("ControllerPosition", (self.KV.ControllerPosition+3)/7)
self:SetNW2Int("ControllerPosition", self.KV.ControllerPosition+3)
self:SetPackedRatio("ReverserPosition", 1-(self.KV.ReverserPosition+1)/2)
self:SetPackedBool("RCUPosition", self.KV.RCU > 0)
self:SetPackedRatio("BLPressure", Pneumatic.ReservoirPressure/16.0)