diff options
| author | Maverick2797 <git.maverick2797@gmail.com> | 2026-07-08 19:13:00 +0800 |
|---|---|---|
| committer | orwell <orwell@bleipb.de> | 2026-07-08 21:32:26 +0200 |
| commit | 1b3b4eb8a76cb059ff1f6bbaa7858f4c12d6b48a (patch) | |
| tree | 34519aff2ce6c184701ac3092cc2610b7c51101b | |
| parent | e58407a1c85663fc853860801e15424ece25fd7c (diff) | |
crash fix: invalid arithmetic in rwt objects in timetable form
| -rw-r--r-- | advtrains_line_automation/line_functions.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/advtrains_line_automation/line_functions.lua b/advtrains_line_automation/line_functions.lua index 2f5cab9..0450fa4 100644 --- a/advtrains_line_automation/line_functions.lua +++ b/advtrains_line_automation/line_functions.lua @@ -984,7 +984,7 @@ local function predict_train_continue(line, stn, rc, departure, result) local stdata = advtrains.lines.stations[stop.stn] if stop.mode == MODE_FINAL or stop.mode == MODE_FINAL_CONTINUE or stop.mode == MODE_FINAL_HIDDEN then -- koncová zastávka - local arr = rwt.add(departure + stop.dep) + local arr = rwt.add(departure, stop.dep) local record = { stn = assert(stop.stn), track = stop.track or "", @@ -999,12 +999,12 @@ local function predict_train_continue(line, stn, rc, departure, result) return elseif stop.mode ~= MODE_DISABLED then -- mezilehlá zastávka - local dep = rwt.add(departure + stop.dep) + local dep = rwt.add(departure, stop.dep) table.insert(result, { stn = assert(stop.stn), track = stop.track or "", stdata = stdata, - arr = dep - (stop.wait or 10), + arr = rwt.add(dep, -(stop.wait or 10)), arr_linevar_def = linevar_def, arr_index = index, dep = dep, |
