mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-02-16 18:54:58 +01:00
Instakill mobs on punch in creative
This commit is contained in:
parent
c7045bc415
commit
20a30f9f44
1 changed files with 4 additions and 0 deletions
|
@ -3148,6 +3148,10 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
|||
return
|
||||
end
|
||||
|
||||
if minetest.is_creative_enabled(hitter:get_player_name()) then
|
||||
self.health = 0
|
||||
end
|
||||
|
||||
-- set/update 'drop xp' timestamp if hitted by player
|
||||
self.xp_timestamp = minetest.get_us_time()
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue