mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
Тиристор 81-710
Исправлен расчет корня из отрицательного числа
This commit is contained in:
@@ -527,7 +527,7 @@ function TRAIN_SYSTEM:SolveThyristorController(Train, dT,iter)
|
||||
self.ThyristorState = 0.92
|
||||
if I > 130 then--I > T * 0.9 then
|
||||
self.PrepareElectric = false
|
||||
self.ThyristorState = (1 - math.max(0, math.min(1, ((Train.Engines.Speed - 50) / 32)) ^ 0.5)) * 0.9
|
||||
self.ThyristorState = (1 - math.max(0, math.min(1, (math.max(0, Train.Engines.Speed - 50) / 32)) ^ 0.5)) * 0.9
|
||||
end
|
||||
else
|
||||
self.ThyristorState = math.max(0, math.min(1, self.ThyristorState + dC / rnd * dT))
|
||||
|
||||
Reference in New Issue
Block a user