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

Дополнительные проверки на наличие тележек в Metrostroi.RerailTrain

This commit is contained in:
kosmik641
2025-12-20 19:20:22 +03:00
parent 2654ceb47e
commit 4efd3cc87a

View File

@@ -217,6 +217,7 @@ function Metrostroi.RerailTrain(train)
--Safety checks --Safety checks
if not IsValid(train) or train.SubwayTrain == nil then return false end if not IsValid(train) or train.SubwayTrain == nil then return false end
if train.NoPhysics or not IsValid(train:GetPhysicsObject()) then return false end if train.NoPhysics or not IsValid(train:GetPhysicsObject()) then return false end
if not IsValid(train.FrontBogey) or not IsValid(train.RearBogey) then return false end
if timer.Exists("metrostroi_rerailer_solid_reset_"..train:EntIndex()) then return false end if timer.Exists("metrostroi_rerailer_solid_reset_"..train:EntIndex()) then return false end
--[[ --[[
--Trace down to get the track --Trace down to get the track