mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-15 04:12:51 -06:00
fixed a crash
This commit is contained in:
@@ -195,8 +195,6 @@ local function send_train_between(map_data, r_station_id, p_station_id, train_id
|
|||||||
if depot_id then
|
if depot_id then
|
||||||
map_data.depots[depot_id].available_train_id = nil
|
map_data.depots[depot_id].available_train_id = nil
|
||||||
train.depot_id = nil
|
train.depot_id = nil
|
||||||
else
|
|
||||||
local test
|
|
||||||
end
|
end
|
||||||
|
|
||||||
train.status = STATUS_D_TO_P
|
train.status = STATUS_D_TO_P
|
||||||
|
|||||||
@@ -835,7 +835,7 @@ local function on_train_changed(event)
|
|||||||
if stop and stop.valid and stop.name == "train-stop" then
|
if stop and stop.valid and stop.name == "train-stop" then
|
||||||
if global.stations[stop.unit_number] then
|
if global.stations[stop.unit_number] then
|
||||||
if train then
|
if train then
|
||||||
on_train_arrives_buffer(global, stop, train)
|
on_train_arrives_buffer(global, stop, train_id, train)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local depot_id = stop.unit_number--[[@as uint]]
|
local depot_id = stop.unit_number--[[@as uint]]
|
||||||
|
|||||||
Reference in New Issue
Block a user