Carts: Reset player view and attachment table on death
authorSmallJoker <mk939@ymail.com>
Fri, 15 May 2020 17:04:34 +0000 (19:04 +0200)
committerSmallJoker <mk939@ymail.com>
Fri, 15 May 2020 17:04:38 +0000 (19:04 +0200)
Fixes #2681

mods/carts/cart_entity.lua

index 39c4c5ca01709b28625e652cd5768988e29d3a21..b95fde703eba92cc9f141efb040ec16e8eacb95c 100644 (file)
@@ -66,7 +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