mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-14 20:12:40 -06:00
fixed crash
This commit is contained in:
@@ -387,11 +387,6 @@ local function tick_dispatch(map_data, mod_settings)
|
|||||||
if p_prior < best_p_prior then
|
if p_prior < best_p_prior then
|
||||||
goto p_continue
|
goto p_continue
|
||||||
end
|
end
|
||||||
|
|
||||||
best_p_dist = p_station.entity_stop.valid and r_station.entity_stop.valid and (best_t_to_p_dist + get_dist(p_station.entity_stop, r_station.entity_stop)) or INF
|
|
||||||
if p_prior == best_p_prior and best_p_dist > best_dist then
|
|
||||||
goto p_continue
|
|
||||||
end
|
|
||||||
if correctness < 1 then
|
if correctness < 1 then
|
||||||
correctness = 1
|
correctness = 1
|
||||||
closest_to_correct_p_station = p_station
|
closest_to_correct_p_station = p_station
|
||||||
@@ -471,6 +466,11 @@ local function tick_dispatch(map_data, mod_settings)
|
|||||||
goto p_continue
|
goto p_continue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
best_p_dist = p_station.entity_stop.valid and r_station.entity_stop.valid and (best_t_to_p_dist + get_dist(p_station.entity_stop, r_station.entity_stop)) or INF
|
||||||
|
if p_prior == best_p_prior and best_p_dist > best_dist then
|
||||||
|
goto p_continue
|
||||||
|
end
|
||||||
|
|
||||||
p_station_i = j
|
p_station_i = j
|
||||||
best_train_id = best_p_train_id
|
best_train_id = best_p_train_id
|
||||||
best_p_prior = p_prior
|
best_p_prior = p_prior
|
||||||
|
|||||||
Reference in New Issue
Block a user