1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00
* Global change.
Замена всех устаревших функции на аналогичные

* Global change.
Добавил локальные переменные там, где это было рентабельно.
This commit is contained in:
Ivan Gordeev
2021-07-26 09:18:18 +03:00
committed by GitHub
parent 4a2786967d
commit 373073e661
29 changed files with 121 additions and 123 deletions

View File

@@ -102,7 +102,8 @@ end
local function TeleEnd(args,ply)
if #args > 0 then
ply:SetPos(table.GetLastValue(Metrostroi.TrackEditor.Paths[tonumber(args[1])]))
local tbl = Metrostroi.TrackEditor.Paths[tonumber(args[1])]
ply:SetPos(tbl[#tbl])
end
end
@@ -118,7 +119,8 @@ end
local function TeleEntEnd(args,ply)
if #args > 0 and IsValid(Train) then
Train:SetPos(table.GetLastValue(Metrostroi.TrackEditor.Paths[tonumber(args[1])]))
local tbl = Metrostroi.TrackEditor.Paths[tonumber(args[1])]
Train:SetPos(ply:SetPos(tbl[#tbl]))
if Train.Base == "gmod_subway_base" then
Metrostroi.RerailTrain(Train)
@@ -207,7 +209,7 @@ local function Think()
end
-- Unused
local function ClientDraw()
if GetConVarNumber("metrostroi_drawsignaldebug") <= 0 then return end
if GetConVar("metrostroi_drawsignaldebug"):GetInt() <= 0 then return end
if #Metrostroi.TrackEditor.Paths == 0 then return end
local lastpos