From 2a78b266b9282f653c2ab35d76a1387480b3d8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=91=CE=BB=CE=AD=CE=BE=CE=B1=CE=BD=CE=B4=CF=81=CE=BF?= =?UTF-8?q?=CF=82?= <31768135+alexandr-sizov@users.noreply.github.com> Date: Tue, 10 Aug 2021 00:56:00 +0300 Subject: [PATCH] resolve #159: fix disabling "RNT" on change Freq to 275Hz (#349) * resolve #159: fix disabling "RNT" on change Freq to 275Hz * refactor * Fix disabling "RNT" on change Freq to 275Hz --- lua/metrostroi/systems/sys_81_717_bars.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/metrostroi/systems/sys_81_717_bars.lua b/lua/metrostroi/systems/sys_81_717_bars.lua index 274b9d2..fb37a1f 100644 --- a/lua/metrostroi/systems/sys_81_717_bars.lua +++ b/lua/metrostroi/systems/sys_81_717_bars.lua @@ -180,9 +180,9 @@ function TRAIN_SYSTEM:Think(dT) self.BR1 = self.KB>0 and (self.BR1 or self.ROCh) and not self.BR2 self.KSR = not self.OnTimer and ((self.KSR or self.RNT) and self.RSS or self.R2O and (self.BR1 and self.ROCh or self.BR2)) self.OldF5 = self.F5>0 - - self.RNT = (self.BR1 or self.BR2) or self.RNT and (self.KSR or KRT and (not self.RUVD or self.R2O)) self.RUVD = (self.RUVD or self.KRH==0) and self.KSR + self.RNT = (self.BR1 or self.BR2) or self.RNT and (self.KSR or (KRT or speed < 0.1) and (not self.RUVD or self.R2O)) + if not self.RUVD--[[ and self.ROCh--]] then if not self.BrakeTimer then self.BrakeTimer = CurTime() end elseif self.BrakeTimer then