From f129248171b556143bdd54fce0aab61c2a0b7019 Mon Sep 17 00:00:00 2001 From: IFRFSX <34205903+IFRFSX@users.noreply.github.com> Date: Sat, 10 Oct 2020 23:52:19 +0800 Subject: [PATCH] Allows to get vehicles in low health conditions --- api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.lua b/api.lua index b6b93d7..7614154 100644 --- a/api.lua +++ b/api.lua @@ -745,7 +745,7 @@ function vehicles.on_punch(self, puncher) end if not self.driver then return end local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(self.driver:get_player_name()) - if self.driver == puncher and (hp == self.hp_max-5 or hp == self.hp_max or creative_mode) then + if self.driver == puncher then local name = self.object:get_luaentity().name local pos = self.object:getpos() minetest.env:add_item(pos, name.."_spawner")