diff options
author | orwell96 <orwell@bleipb.de> | 2020-04-27 16:02:28 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-02-10 16:36:24 +0100 |
commit | 5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4 (patch) | |
tree | 5c72e9e541401126d5416b6d122893c300b88bea /advtrains/trainlogic.lua | |
parent | b59b0d587d72f78c5923aa501038b93269bba271 (diff) | |
download | advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.tar.gz advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.tar.bz2 advtrains-5c2534cc35bc0fc47b53c8a992e3e71b15a60ec4.zip |
Remove pcall wrappers completely, add command to disable advtrains mainloop
Diffstat (limited to 'advtrains/trainlogic.lua')
-rw-r--r-- | advtrains/trainlogic.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua index a5da28e..9e9f021 100644 --- a/advtrains/trainlogic.lua +++ b/advtrains/trainlogic.lua @@ -127,7 +127,6 @@ function advtrains.tp_player_to_train(player) end end minetest.register_on_joinplayer(function(player) - return advtrains.pcall(function() advtrains.hud[player:get_player_name()] = nil advtrains.hhud[player:get_player_name()] = nil --independent of this, cause all wagons of the train which are loaded to reattach their players @@ -137,12 +136,10 @@ minetest.register_on_joinplayer(function(player) wagon:reattach_all() end end - end) end) minetest.register_on_dieplayer(function(player) - return advtrains.pcall(function() local pname=player:get_player_name() local id=advtrains.player_to_train_mapping[pname] if id then @@ -156,7 +153,6 @@ minetest.register_on_dieplayer(function(player) end end end - end) end) --[[ @@ -421,7 +417,7 @@ function advtrains.train_step_b(id, train, dtime) v_target_apply(v_targets, VLEVER_EMERG, braketar) end else - v_target_apply(v_targets, VLEVER_BRAKE, braketar) + v_target_apply(v_targets, VLEVER_ROLL, braketar) end end end |