~gpcf/advtrains

[PATCH] Hotfix for split_at_index issue

Details
Message ID
<22db66e8-aed1-9cde-95e5-352832fdb640@gpcf.eu>
DKIM signature
missing
Download raw message
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index 00c04bf..fcf180a 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -641,7 +641,7 @@ function advtrains.train_step_b(id, train, dtime)
                                 if target_is_inside then
                                         local our_index = 
advtrains.path_project(otrn, ref_index, id)
                                         --atdebug("Backprojected 
our_index",our_index)
-                                       if our_index and our_index <= 
new_index_curr_tv then
+                                       if our_index and our_index > -1 
and our_index <= new_index_curr_tv then
                                                 -- ON_TRACK COLLISION 
IS HAPPENING
                                                 -- the actual collision 
is handled in train_step_c, so set appropriate signal variables
train.ontrack_collision_info = {
Reply to thread Export thread (mbox)