mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 06:13:02 +00:00
Slime: Don't add speed if mother was stuck
This commit is contained in:
parent
958989c80d
commit
3563b5448c
1 changed files with 3 additions and 1 deletions
|
@ -33,7 +33,9 @@ local spawn_children_on_die = function(self, pos, child_mob, children_count, spa
|
||||||
speed_penalty = 0.5
|
speed_penalty = 0.5
|
||||||
end
|
end
|
||||||
local mob = minetest.add_entity(newpos, child_mob)
|
local mob = minetest.add_entity(newpos, child_mob)
|
||||||
mob:set_velocity(vector.multiply(dir, eject_speed * speed_penalty))
|
if (not mother_stuck) then
|
||||||
|
mob:set_velocity(vector.multiply(dir, eject_speed * speed_penalty))
|
||||||
|
end
|
||||||
mob:set_yaw(angle - math.pi/2)
|
mob:set_yaw(angle - math.pi/2)
|
||||||
table.insert(children, mob)
|
table.insert(children, mob)
|
||||||
angle = angle + (math.pi*2)/children_count
|
angle = angle + (math.pi*2)/children_count
|
||||||
|
|
Loading…
Reference in a new issue