mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Set raiders on path to village after spawn
This commit is contained in:
parent
9893dee1aa
commit
ae90cbe3ef
1 changed files with 3 additions and 1 deletions
|
@ -62,11 +62,13 @@ function mcl_raids.spawn_raid(event)
|
|||
end
|
||||
for m,c in pairs(w) do
|
||||
for i=1,c do
|
||||
local mob = mcl_mobs.spawn(spawn_pos,m)
|
||||
local p = vector.offset(spawn_pos,0,1,0)
|
||||
local mob = mcl_mobs.spawn(p,m)
|
||||
local l = mob:get_luaentity()
|
||||
if l then
|
||||
event.health_max = event.health_max + l.health
|
||||
table.insert(event.mobs,mob)
|
||||
mcl_mobs:gopath(l,pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue