Fix carts randomly derailing (#4780)

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4780
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This commit is contained in:
teknomunk 2024-12-31 19:35:54 +01:00 committed by the-real-herowl
parent 9c51ed0518
commit ca504e80c7

View file

@ -391,7 +391,7 @@ function mod.place_minecart(itemstack, pointed_thing, placer)
local look_4dir = math.round(placer:get_look_horizontal() * TWO_OVER_PI) % 4
local look_dir = core.fourdir_to_dir(look_4dir)
look_dir.x = -look_dir.x
look_dir = vector.new(-look_dir.x,0,look_dir.z)
local spawn_pos = pointed_thing.above
local cart_dir = look_dir