mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 03:07:32 +01:00
Merge branch 'fix_mob_damage_color' of https://github.com/Rootyjr/MineClone2
This commit is contained in:
commit
915ac2da93
@ -453,8 +453,14 @@ local check_for_death = function(self, cause, cmi_cause)
|
||||
self.health = self.hp_max
|
||||
end
|
||||
|
||||
-- play damage sound if health was reduced
|
||||
-- play damage sound if health was reduced and make mob flash red.
|
||||
if damaged then
|
||||
self.object:set_texture_mod("^[colorize:#FF000040")
|
||||
minetest.after(.2, function()
|
||||
if self then
|
||||
self.object:set_texture_mod("")
|
||||
end
|
||||
end)
|
||||
mob_sound(self, self.sounds.damage)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user