baby head enlargement, Runnaway from wolf

This commit is contained in:
epCode 2021-03-24 16:41:34 -07:00
parent 912238ccd9
commit 8160361b53
2 changed files with 6 additions and 2 deletions

View File

@ -35,6 +35,7 @@ local fox = {
mesh = "extra_mobs_fox.b3d",
textures = { {
"extra_mobs_fox.png",
"extra_mobs_trans.png",
} },
visual_size = {x=3, y=3},
sounds = {
@ -64,10 +65,13 @@ local fox = {
on_spawn = function(self)
if minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:snow") ~= nil or minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:dirt_with_grass_snow") ~= nil then
minetest.chat_send_all("true")
self.object:set_properties({textures={"extra_mobs_artic_fox.png"}})
self.object:set_properties({textures={"extra_mobs_artic_fox.png", "extra_mobs_trans.png"}})
end
end,
do_custom = function(self)
if self.child == true then
self.object:set_properties({textures={self.base_texture[1], self.base_texture[1]}})
end
if self.state ~= "attack" and math.random(1, 5000) == 1 then
self.state = "lay"
self.object:set_animation({x= 12, y=16})
@ -88,7 +92,7 @@ local fox = {
y = lp.y - s.y,
z = lp.z - s.z
}
if object:is_player() and not object:get_player_control().sneak then
if object:is_player() and not object:get_player_control().sneak or not object:is_player() and object:get_luaentity().name == "mobs_mc:wolf" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
if self.reach > vector.distance(self.object:get_pos(), object:get_pos()) and self.timer > .9 and minetest.is_creative_enabled() == false then

Binary file not shown.