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

release branch init

This commit is contained in:
g_brzhezinskiy
2021-01-02 15:32:05 +03:00
parent 1d05caf866
commit 09566ce158
398 changed files with 8389 additions and 77275 deletions

View File

@@ -74,16 +74,16 @@ function TRAIN_SYSTEM:Think(dT)
self.TPSpeed = math.max(-1,math.min(1,self.TPSpeed+dT*(self.TPTS-self.TPMS)*0.9))
end
self.TPPosition = math.max(0,math.min(1,self.TPPosition + self.RotationRate*self.TPSpeed))
self.NZ = self.ReverserPosition < 0.2 and 1 or 0
self.VP = self.ReverserPosition > 0.2 and 1 or 0
self.TPM = self.TPPosition < 0.2 and 1 or 0
self.TPT = self.TPPosition > 0.2 and 1 or 0
if self.ReverserPosition < 0.1 and self.RKRSmd or self.ReverserPosition > 0.9 and not self.RKRSmd then
self.RKRSmd = self.ReverserPosition > 0.9
self.NZ = self.ReverserPosition < 0.5 and 1 or 0
self.VP = self.ReverserPosition >= 0.5 and 1 or 0
self.TPM = self.TPPosition < 0.5 and 1 or 0
self.TPT = self.TPPosition >= 0.5 and 1 or 0
if self.OldVP ~= self.VP then
self.OldVP = self.VP
self.Train:PlayOnce("RKR","bass",1,1)
end
if self.TPPosition < 0.1 and self.TPMSnd or self.TPPosition > 0.9 and not self.TPMSnd then
self.TPMSnd = self.TPPosition > 0.9
if self.OldTPM ~= self.TPM then
self.OldTPM = self.TPM
self.Train:PlayOnce("T","bass",1,1)
end