diff options
author | orwell96 <orwell@bleipb.de> | 2021-02-12 11:55:57 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-02-12 11:55:57 +0100 |
commit | 737eb4987f30a48bebf0ac4a78b0c62e73a813e4 (patch) | |
tree | 4cd5d846be8af13814a6c7021d3464fdf4f7bcfb /advtrains/trainlogic.lua | |
parent | b65d99aa2c816b6dea3ecb6dd824ce02f7519fe2 (diff) | |
download | advtrains-737eb4987f30a48bebf0ac4a78b0c62e73a813e4.tar.gz advtrains-737eb4987f30a48bebf0ac4a78b0c62e73a813e4.tar.bz2 advtrains-737eb4987f30a48bebf0ac4a78b0c62e73a813e4.zip |
LZB: Look ahead before movement, not after
Diffstat (limited to 'advtrains/trainlogic.lua')
-rw-r--r-- | advtrains/trainlogic.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua index a307256..c9c7e76 100644 --- a/advtrains/trainlogic.lua +++ b/advtrains/trainlogic.lua @@ -339,6 +339,10 @@ function advtrains.train_step_b(id, train, dtime) advtrains.path_get(train, atfloor(train.index + 2)) advtrains.path_get(train, atfloor(train.end_index - 1)) + -- run pre-move hooks + -- TODO: if more pre-move hooks are added, make a separate callback hook + advtrains.lzb_look_ahead(id, train) + --[[ again, new velocity control: There are two heterogenous means of control: -> set a fixed acceleration and ignore speed (user) |