mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-13 14:00:32 +01:00
fix bug if detach player whithout set entity.driver=nil
This commit is contained in:
parent
6ce526a30a
commit
cff8ee1aae
|
@ -1859,7 +1859,14 @@ minetest.register_entity(name, {
|
|||
dir = dir or {x = 0, y = 0, z = 0}
|
||||
|
||||
-- weapon wear
|
||||
hitter:set_detach() --MFF (crabman|27/7/2015) anti usebug, immortal if attached
|
||||
local attach = hitter:get_attach()
|
||||
if attach and attach:get_luaentity() then
|
||||
local luaentity = attach:get_luaentity()
|
||||
if luaentity.driver then
|
||||
luaentity.driver = nil
|
||||
end
|
||||
hitter:set_detach() --MFF (crabman|27/7/2015) anti usebug, immortal if attached
|
||||
end
|
||||
local weapon = hitter:get_wielded_item()
|
||||
local punch_interval = 1.4
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user