Merge pull request 'Fix incorrect call to gopath for raid due to mobs refactor.' (#3063) from bugfix/raids_crash_gopath into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3063
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
This commit is contained in:
ancientmarinerdev 2022-12-05 13:10:01 +00:00
commit 055a93843f
2 changed files with 3 additions and 2 deletions

View File

@ -179,7 +179,8 @@ function mcl_raids.spawn_raid(event)
l.raidmob = true
event.health_max = event.health_max + l.health
table.insert(event.mobs,mob)
mcl_mobs:gopath(l,pos)
--minetest.log("action", "[mcl_raids] Here we go. Raid time")
l:gopath(pos)
end
end
end

View File

@ -11,7 +11,7 @@ local function spawn_zombies(self)
if check_spawn_pos(p) then
local m = mcl_mobs.spawn(p,"mobs_mc:zombie")
local l = m:get_luaentity()
mcl_mobs:gopath(m:get_luaentity(),self.pos)
l:gopath(self.pos)
table.insert(self.mobs,m)
self.health_max = self.health_max + l.health
end