mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Merge pull request 'undelcared global yaw in mob api fix' (#2840) from epcode-patch-1 into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2840 Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
commit
426ee6e167
1 changed files with 1 additions and 1 deletions
|
@ -3525,7 +3525,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
|||
-- if skittish then run away
|
||||
if hitter and is_player and hitter:get_pos() and not die and self.runaway == true and self.state ~= "flop" then
|
||||
|
||||
yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos())))
|
||||
local yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos())))
|
||||
minetest.after(0.2,function()
|
||||
if self and self.object and self.object:get_pos() and hitter and is_player and hitter:get_pos() then
|
||||
yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos())))
|
||||
|
|
Loading…
Reference in a new issue