mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-12 10:50:21 +01:00
fix runaway player nil
This commit is contained in:
parent
ee8c19ce21
commit
d20ea74890
4
api.lua
4
api.lua
@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20200629",
|
version = "20200701",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
@ -1963,8 +1963,8 @@ function mob_class:do_runaway_from()
|
|||||||
if name ~= "" and name ~= self.name
|
if name ~= "" and name ~= self.name
|
||||||
and specific_runaway(self.runaway_from, name) then
|
and specific_runaway(self.runaway_from, name) then
|
||||||
|
|
||||||
p = player:get_pos()
|
|
||||||
sp = s
|
sp = s
|
||||||
|
p = player and player:get_pos() or s
|
||||||
|
|
||||||
-- aim higher to make looking up hills more realistic
|
-- aim higher to make looking up hills more realistic
|
||||||
p.y = p.y + 1
|
p.y = p.y + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user