mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-24 00:49:34 +01:00
make ghast firing more MC-like
This commit is contained in:
parent
f8229def5e
commit
ac87e0604e
3 changed files with 13 additions and 0 deletions
|
@ -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,
|
||||
})
|
||||
|
||||
|
||||
|
|
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png
Normal file
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_ghast_firing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in a new issue