merge from main
This commit is contained in:
parent
6d19e80d8e
commit
8378497d02
@ -198,6 +198,14 @@ function mgen_follow.callback(entity,now)
|
||||
targetpos = entity.dynamic_data.movement.target:getpos()
|
||||
end
|
||||
|
||||
if targetpos == nil then
|
||||
mobf_bug_warning(LOGLEVEL_ERROR,"MOBF: " .. entity.data.name
|
||||
.. " don't have targetpos "
|
||||
.. "SP: " .. dump(entity.dynamic_data.spawning.spawnpoint)
|
||||
.. " TGT: " .. dump(entity.dynamic_data.movement.target))
|
||||
return
|
||||
end
|
||||
|
||||
local distance = mobf_calc_distance_2d(basepos,targetpos)
|
||||
|
||||
local yaccel = environment.get_default_gravity(basepos,
|
||||
@ -395,4 +403,4 @@ end
|
||||
|
||||
|
||||
--register this movement generator
|
||||
registerMovementGen(mgen_follow.name,mgen_follow)
|
||||
registerMovementGen(mgen_follow.name,mgen_follow)
|
||||
|
Loading…
x
Reference in New Issue
Block a user