directional correction after switching from look_yaw to look_horiztonal
This commit is contained in:
parent
22cc4a2442
commit
1f3932b35b
@ -154,7 +154,7 @@ minetest.register_entity("nssm:mortick", {
|
|||||||
--If found a player follow him
|
--If found a player follow him
|
||||||
if self.attack ~= 0 then
|
if self.attack ~= 0 then
|
||||||
local p = self.attack:getpos()
|
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
|
local pi = math.pi
|
||||||
|
|
||||||
p.y = p.y + 1
|
p.y = p.y + 1
|
||||||
|
@ -154,7 +154,7 @@ mobs:register_mob("nssm:morgut", {
|
|||||||
self.morgut_timer = os.time()
|
self.morgut_timer = os.time()
|
||||||
self.curr_attack = self.attack
|
self.curr_attack = self.attack
|
||||||
self.state = ""
|
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.dir = pyaw
|
||||||
self.object:setyaw(pyaw)
|
self.object:setyaw(pyaw)
|
||||||
if self then
|
if self then
|
||||||
|
@ -189,7 +189,7 @@ mobs:register_mob("nssm:morlu", {
|
|||||||
self.morlu_timer = os.time()
|
self.morlu_timer = os.time()
|
||||||
self.curr_attack = self.attack
|
self.curr_attack = self.attack
|
||||||
self.state = ""
|
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.dir = pyaw
|
||||||
self.object:setyaw(pyaw)
|
self.object:setyaw(pyaw)
|
||||||
if self then
|
if self then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user