mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Simulate air pressure drop while the typhoon is engaged
This commit is contained in:
@@ -670,7 +670,7 @@ function ENT:Think()
|
||||
else
|
||||
self:SetPackedRatio("BLPressure", Pneumatic.BrakeLinePressure/16.0)
|
||||
end
|
||||
self:SetPackedRatio("TLPressure", Pneumatic.TrainLinePressure/16.0)
|
||||
self:SetPackedRatio("TLPressure", Pneumatic.AuxiliaryLinePressure/16.0)
|
||||
self:SetPackedRatio("BCPressure", Pneumatic.BrakeCylinderPressure/6.0)
|
||||
self:SetPackedRatio("EnginesVoltage", self.Electric.Aux750V/1000.0)
|
||||
self:SetPackedRatio("EnginesCurrent2", 0.5 + 0.5*(self.Electric.I13/500.0))
|
||||
|
||||
@@ -1097,7 +1097,9 @@ function ENT:Think()
|
||||
|
||||
if i==1 then
|
||||
local no1 = ntbl.loop and ntbl.loop==0
|
||||
local endt = (ntbl.loop and snd:GetTime() > ntbl.loop or snd:GetTime()/snd:GetLength() >= 0.8) or no1
|
||||
--Any use of endt local was commented out to avoid unexpected interruption of the horn sound being played during air pressure reduction
|
||||
--(seems like it doesn't affect other sounds but still need to be repeatedly tested)
|
||||
--local endt = (ntbl.loop and snd:GetTime() > ntbl.loop or snd:GetTime()/snd:GetLength() >= 0.8) or no1
|
||||
if stbl.state and stbl.volume < v.volume and not no1 then
|
||||
if snd:GetState() ~= GMOD_CHANNEL_PLAYING then
|
||||
snd:Play()
|
||||
@@ -1118,7 +1120,7 @@ function ENT:Think()
|
||||
end
|
||||
stbl.time = nil
|
||||
end
|
||||
if stbl.state and endt then
|
||||
if stbl.state then --and endt then
|
||||
stbl.state = false
|
||||
if no1 then
|
||||
stbl.time = true
|
||||
|
||||
Reference in New Issue
Block a user