diff options
Diffstat (limited to 'railcart')
-rw-r--r-- | railcart/init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railcart/init.lua b/railcart/init.lua index c637e3f..7ca7fe2 100644 --- a/railcart/init.lua +++ b/railcart/init.lua @@ -136,6 +136,12 @@ minetest.register_entity("railcart:cart_entity", { self.timer = railcart:update(cart, RAILCART_ENTITY_UPDATE_TIME, object) end, get_staticdata = function(self) + if self.cart then + if self.cart:is_loaded() == false then + self.cart.timer = 0 + self.object:remove() + end + end return "expired" end, }) |