directional correction after switching from look_yaw to look_horiztonal

This commit is contained in:
Tai Kedzierski 2019-01-12 13:32:04 +00:00
parent 22cc4a2442
commit 1f3932b35b
3 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ minetest.register_entity("nssm:mortick", {
--If found a player follow him
if self.attack ~= 0 then
local p = self.attack:getpos()
local yawp = self.attack:get_look_horizontal()
local yawp = self.attack:get_look_horizontal()+math.pi/2
local pi = math.pi
p.y = p.y + 1

View File

@ -154,7 +154,7 @@ mobs:register_mob("nssm:morgut", {
self.morgut_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_horizontal()
local pyaw = self.curr_attack: get_look_horizontal()+math.pi/2
self.dir = pyaw
self.object:setyaw(pyaw)
if self then

View File

@ -189,7 +189,7 @@ mobs:register_mob("nssm:morlu", {
self.morlu_timer = os.time()
self.curr_attack = self.attack
self.state = ""
local pyaw = self.curr_attack: get_look_horizontal()
local pyaw = self.curr_attack: get_look_horizontal()+math.pi/2
self.dir = pyaw
self.object:setyaw(pyaw)
if self then