forked from VoxeLibre/VoxeLibre
make ghast firing more MC-like
This commit is contained in:
parent
f8229def5e
commit
ac87e0604e
|
@ -2819,6 +2819,10 @@ local do_states = function(self, dtime)
|
|||
local arrow, ent
|
||||
local v = 1
|
||||
if not self.shoot_arrow then
|
||||
self.firing = true
|
||||
minetest.after(1, function()
|
||||
self.firing = false
|
||||
end)
|
||||
arrow = minetest.add_entity(p, self.arrow)
|
||||
ent = arrow:get_luaentity()
|
||||
if ent.velocity then
|
||||
|
|
|
@ -63,6 +63,15 @@ mobs:register_mob("mobs_mc:ghast", {
|
|||
makes_footstep_sound = false,
|
||||
instant_death = true,
|
||||
fire_resistant = true,
|
||||
do_custom = function(self)
|
||||
if self.firing == true then
|
||||
self.base_texture = {"mobs_mc_ghast_firing.png"}
|
||||
self.object:set_properties({textures=self.base_texture})
|
||||
else
|
||||
self.base_texture = {"mobs_mc_ghast.png"}
|
||||
self.object:set_properties({textures=self.base_texture})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue