aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-12-27 18:04:42 +0100
committerorwell96 <orwell@bleipb.de>2021-02-10 16:39:45 +0100
commit080b8fb27342827965bab2567dde14e57433b55e (patch)
treec66ee6fb80a191b09ca9ba4a658c2d5a0b3f533b /advtrains/wagons.lua
parent9a775eff5b7a49c322119feb4c8248791edab501 (diff)
downloadadvtrains-080b8fb27342827965bab2567dde14e57433b55e.tar.gz
advtrains-080b8fb27342827965bab2567dde14e57433b55e.tar.bz2
advtrains-080b8fb27342827965bab2567dde14e57433b55e.zip
Add IGNORE_WORLD mode to test using only the advtrains save data
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 4e7fb26..7b6a381 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -10,6 +10,8 @@
-- TP delay when getting off wagon
local GETOFF_TP_DELAY = 0.5
+local IGNORE_WORLD = advtrains.IGNORE_WORLD
+
advtrains.wagons = {}
advtrains.wagon_prototypes = {}
advtrains.wagon_objects = {}
@@ -446,7 +448,7 @@ function wagon:on_step(dtime)
end
--checking for environment collisions(a 3x3 cube around the center)
- if is_in_loaded_area and not train.recently_collided_with_env then
+ if not IGNORE_WORLD and is_in_loaded_area and not train.recently_collided_with_env then
local collides=false
local exh = self.extent_h or 1
local exv = self.extent_v or 2