diff options
author | orwell96 <orwell@bleipb.de> | 2018-05-29 15:53:34 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-06-14 17:39:42 +0200 |
commit | 3d7924c751bc8ca438e4b9bd1cb1f241cc636494 (patch) | |
tree | f389bb158500b7bdb03d792f7f1a80bd8a5de18b /advtrains/tracks.lua | |
parent | 521112aced4e06f8fb59c9dfe8d0e082da858eb1 (diff) | |
download | advtrains-3d7924c751bc8ca438e4b9bd1cb1f241cc636494.tar.gz advtrains-3d7924c751bc8ca438e4b9bd1cb1f241cc636494.tar.bz2 advtrains-3d7924c751bc8ca438e4b9bd1cb1f241cc636494.zip |
Fix bugs found while testing
Diffstat (limited to 'advtrains/tracks.lua')
-rw-r--r-- | advtrains/tracks.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/tracks.lua b/advtrains/tracks.lua index eefff66..559ada7 100644 --- a/advtrains/tracks.lua +++ b/advtrains/tracks.lua @@ -304,7 +304,7 @@ function advtrains.register_tracks(tracktype, def, preset) if var.switchalt and var.switchst then
local switchfunc=function(pos, node, newstate)
- if newstate~=var.switchst then
+ if newstate~=var.switchst and not advtrains.get_train_at_pos(pos) then
advtrains.ndb.swap_node(pos, {name=def.nodename_prefix.."_"..var.switchalt..rotation, param2=node.param2})
advtrains.invalidate_all_paths(pos)
end
|