mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-14 20:00:18 +01:00
missed local
This commit is contained in:
parent
00e8ac0850
commit
99fe3d0ce1
4
api.lua
4
api.lua
@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20200502",
|
version = "20200504",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@ function mob_class:do_stay_near()
|
|||||||
local direction = vector.direction(pos, target)
|
local direction = vector.direction(pos, target)
|
||||||
local vec = {x = target.x - pos.x, z = target.z - pos.z}
|
local vec = {x = target.x - pos.x, z = target.z - pos.z}
|
||||||
|
|
||||||
yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate
|
local yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate
|
||||||
|
|
||||||
if target.x > pos.x then
|
if target.x > pos.x then
|
||||||
yaw = yaw + pi
|
yaw = yaw + pi
|
||||||
|
Loading…
Reference in New Issue
Block a user