fix attach detection

This commit is contained in:
Alexsandro Percy 2025-06-03 19:05:22 -03:00
parent 9fcb4b55db
commit 48b5ec897b

View File

@ -115,7 +115,8 @@ function automobiles_lib.on_punch (self, puncher, ttime, toolcaps, dir, damage)
end
local is_attached = false
if puncher:get_attach() == self.driver_seat then is_attached = true end
local obj_attach = puncher:get_attach()
if obj_attach == self.driver_seat or obj_attach == self.object then is_attached = true end
local itmstck=puncher:get_wielded_item()
local item_name = ""