Streamline abms. Fix manticore poison.

This commit is contained in:
Duane 2016-08-06 23:12:26 -05:00
parent 678b025cb0
commit 5ae6e9f89c
5 changed files with 294 additions and 392 deletions

View file

@ -49,7 +49,7 @@ mobs:register_mob("fun_caves:manticore", {
return
end
if self.attack and math.random(3) == 1 then
if self.attack and math.random(3) == 1 and self.attack:is_player(self.attack) and minetest.line_of_sight(self.attack:getpos(), self.object:getpos(), stepsize) then
local player_name = self.attack:get_player_name()
if player_name and player_name ~= '' then
minetest.chat_send_player(player_name, minetest.colorize('#FF0000', 'You\'ve been poisoned!'))