diff options
author | orwell96 <orwell@bleipb.de> | 2019-02-19 15:49:01 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2019-02-19 15:49:01 +0100 |
commit | 391a57f90ce5fccc0f5e587e880bf9770e2ecfb5 (patch) | |
tree | 1d202018811d6c8becf6ef56f1a5e6a93245e266 /advtrains | |
parent | 84f1c3d8a5eb7807c069718c08e6e453ffd585e3 (diff) | |
download | advtrains-391a57f90ce5fccc0f5e587e880bf9770e2ecfb5.tar.gz advtrains-391a57f90ce5fccc0f5e587e880bf9770e2ecfb5.tar.bz2 advtrains-391a57f90ce5fccc0f5e587e880bf9770e2ecfb5.zip |
Prioritize LZB callback (possible bugfix for H#100)
Diffstat (limited to 'advtrains')
-rw-r--r-- | advtrains/trainlogic.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua index ad51c42..2371490 100644 --- a/advtrains/trainlogic.lua +++ b/advtrains/trainlogic.lua @@ -573,9 +573,13 @@ end local function mknodecallback(name) local callt = {} - advtrains["tnc_register_on_"..name] = function(func) + advtrains["tnc_register_on_"..name] = function(func, prio) assertt(func, "function") - table.insert(callt, func) + if prio then + table.insert(callt, 1, func) + else + table.insert(callt, func) + end end return callt, function(pos, id, train, index) for _,f in ipairs(callt) do |