mirror of
https://github.com/veden/Rampant.git
synced 2024-12-26 20:54:12 +02:00
FACTO-286: Added entity destruction on group disbanding
This commit is contained in:
parent
ef510619fc
commit
5cb00d5bce
@ -1,6 +1,9 @@
|
||||
Version: 3.3.0
|
||||
Improvements:
|
||||
- Re-added kamikaze squad state to prevent unit group dancing and then disbanding
|
||||
- Squad compression can be triggered multiple times on a single group
|
||||
Tweaks:
|
||||
- On group destruction all members are destroyed to prevent orphaned biters
|
||||
Bugfixes:
|
||||
- Fixed occasionally compression number wouldn't appear on unit group
|
||||
- Fixed squad compression could take place when attacking
|
||||
|
@ -277,7 +277,7 @@ local function addMovementPenalty(squad, chunk)
|
||||
squad.kamikaze = true
|
||||
squad.penalties = {}
|
||||
else
|
||||
for entity in pairs(squad.group.members) do
|
||||
for _, entity in pairs(squad.group.members) do
|
||||
if entity.valid then
|
||||
entity.destroy()
|
||||
end
|
||||
@ -726,6 +726,11 @@ function Squad.cleanSquads(tick)
|
||||
Squad.squadDispatch(squad, tick)
|
||||
elseif (squad.commandTick and (squad.commandTick < tick)) then
|
||||
if squad.wanders > 5 then
|
||||
for _, entity in pairs(squad.group.members) do
|
||||
if entity.valid then
|
||||
entity.destroy()
|
||||
end
|
||||
end
|
||||
squad.group.destroy()
|
||||
else
|
||||
squad.wanders = squad.wanders + 1
|
||||
|
Loading…
Reference in New Issue
Block a user