mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
@@ -615,17 +615,20 @@ local function colAlpha(col,a)
|
|||||||
end
|
end
|
||||||
hook.Add("PostDrawTranslucentRenderables", "metrostroi_base_draw", function(_,isDD)
|
hook.Add("PostDrawTranslucentRenderables", "metrostroi_base_draw", function(_,isDD)
|
||||||
if isDD then return end
|
if isDD then return end
|
||||||
|
local inSeat = LocalPlayer().InMetrostroiTrain
|
||||||
for ent in pairs(Metrostroi.SpawnedTrains) do
|
for ent in pairs(Metrostroi.SpawnedTrains) do
|
||||||
if ent:IsDormant() then continue end
|
if ent:IsDormant() then continue end
|
||||||
if MetrostroiStarted and MetrostroiStarted~=true or ent.RenderBlock then
|
if MetrostroiStarted and MetrostroiStarted~=true or ent.RenderBlock then
|
||||||
|
if not inSeat then
|
||||||
local timeleft = (math.max(0,(MetrostroiStarted and MetrostroiStarted~=true) and 3-(RealTime()-MetrostroiStarted) or 3-(RealTime()-ent.RenderBlock)))+0.99
|
local timeleft = (math.max(0,(MetrostroiStarted and MetrostroiStarted~=true) and 3-(RealTime()-MetrostroiStarted) or 3-(RealTime()-ent.RenderBlock)))+0.99
|
||||||
cam.Start3D2D(ent:LocalToWorld(Vector(0,-200,100)),ent:LocalToWorldAngles(Angle(0,90,90)),2)
|
cam.Start3D2D(ent:LocalToWorld(Vector(0,-150,100)),ent:LocalToWorldAngles(Angle(0,90,90)),1.5)
|
||||||
draw.SimpleText("Wait, train will be available across "..string.NiceTime(timeleft))
|
draw.SimpleText("Wait, train will be available across "..string.NiceTime(timeleft))
|
||||||
cam.End3D2D()
|
cam.End3D2D()
|
||||||
cam.Start3D2D(ent:LocalToWorld(Vector(0,200,100)),ent:LocalToWorldAngles(Angle(0,-90,90)),2)
|
cam.Start3D2D(ent:LocalToWorld(Vector(0,150,100)),ent:LocalToWorldAngles(Angle(0,-90,90)),1.5)
|
||||||
draw.SimpleText("Wait, train will be available across "..string.NiceTime(timeleft))
|
draw.SimpleText("Wait, train will be available across "..string.NiceTime(timeleft))
|
||||||
cam.End3D2D()
|
cam.End3D2D()
|
||||||
return
|
end
|
||||||
|
continue
|
||||||
end
|
end
|
||||||
cam.IgnoreZ(true)
|
cam.IgnoreZ(true)
|
||||||
for i,vHandle in pairs(ent.Sprites) do
|
for i,vHandle in pairs(ent.Sprites) do
|
||||||
|
|||||||
Reference in New Issue
Block a user