mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-09 17:23:51 +01:00
Carts: Re-add erroneously removed driver reset
carts:manage_attachment does not handle the driver value of the cart, hence carts could not be used by another player until it's replaced.
This commit is contained in:
parent
b787fcf7e4
commit
3452938c76
@ -66,6 +66,7 @@ end
|
|||||||
-- 0.5.x and later: When the driver leaves
|
-- 0.5.x and later: When the driver leaves
|
||||||
function cart_entity:on_detach_child(child)
|
function cart_entity:on_detach_child(child)
|
||||||
if child and child:get_player_name() == self.driver then
|
if child and child:get_player_name() == self.driver then
|
||||||
|
self.driver = nil
|
||||||
carts:manage_attachment(child, nil)
|
carts:manage_attachment(child, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user