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.
Этот коммит содержится в:
SmallJoker 2020-05-16 19:26:28 +02:00
родитель b787fcf7e4
Коммит 3452938c76
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -66,6 +66,7 @@ end
-- 0.5.x and later: When the driver leaves
function cart_entity:on_detach_child(child)
if child and child:get_player_name() == self.driver then
self.driver = nil
carts:manage_attachment(child, nil)
end
end