mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-01-06 08:37:30 +01:00
Handle edge case in mcl_minecarts.reverse_cart_direction() that lead to strange punching and pushing behavior
This commit is contained in:
parent
31066caf06
commit
cacc9d384f
@ -504,6 +504,10 @@ function mod.get_cart_position(cart_staticdata)
|
||||
end
|
||||
|
||||
function mod.reverse_cart_direction(staticdata)
|
||||
if staticdata.distance == 0 then
|
||||
staticdata.dir = -staticdata.dir
|
||||
return
|
||||
end
|
||||
|
||||
-- Complete moving thru this block into the next, reverse direction, and put us back at the same position we were at
|
||||
local next_dir = -staticdata.dir
|
||||
|
Loading…
Reference in New Issue
Block a user