mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-17 21:23:44 +01:00
Instakill mobs on punch in creative
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user