mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-30 22:41:20 +01:00
Make sure carts get detatch if the rail under them is removed
This commit is contained in:
parent
24bf99df44
commit
dcf833907e
1 changed files with 1 additions and 2 deletions
|
@ -370,8 +370,6 @@ local function do_movement_step(self, dtime)
|
||||||
-- Enter the new node
|
-- Enter the new node
|
||||||
handle_cart_enter(self, pos, next_dir)
|
handle_cart_enter(self, pos, next_dir)
|
||||||
|
|
||||||
try_detach_minecart(self)
|
|
||||||
|
|
||||||
-- Handle end of track
|
-- Handle end of track
|
||||||
if next_dir == staticdata.dir * -1 and next_dir.y == 0 then
|
if next_dir == staticdata.dir * -1 and next_dir.y == 0 then
|
||||||
if DEBUG then print("Stopping cart at end of track at "..tostring(pos)) end
|
if DEBUG then print("Stopping cart at end of track at "..tostring(pos)) end
|
||||||
|
@ -437,6 +435,7 @@ local function do_movement( self, dtime )
|
||||||
-- causing large timesteps
|
-- causing large timesteps
|
||||||
while dtime > 0 do
|
while dtime > 0 do
|
||||||
local new_dtime = do_movement_step(self, dtime)
|
local new_dtime = do_movement_step(self, dtime)
|
||||||
|
try_detach_minecart(self)
|
||||||
|
|
||||||
update_train(self)
|
update_train(self)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue