mirror of
https://github.com/veden/Rampant.git
synced 2025-01-14 02:23:01 +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
|
Version: 3.3.0
|
||||||
Improvements:
|
Improvements:
|
||||||
- Re-added kamikaze squad state to prevent unit group dancing and then disbanding
|
- 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:
|
Bugfixes:
|
||||||
- Fixed occasionally compression number wouldn't appear on unit group
|
- Fixed occasionally compression number wouldn't appear on unit group
|
||||||
- Fixed squad compression could take place when attacking
|
- Fixed squad compression could take place when attacking
|
||||||
|
@ -277,7 +277,7 @@ local function addMovementPenalty(squad, chunk)
|
|||||||
squad.kamikaze = true
|
squad.kamikaze = true
|
||||||
squad.penalties = {}
|
squad.penalties = {}
|
||||||
else
|
else
|
||||||
for entity in pairs(squad.group.members) do
|
for _, entity in pairs(squad.group.members) do
|
||||||
if entity.valid then
|
if entity.valid then
|
||||||
entity.destroy()
|
entity.destroy()
|
||||||
end
|
end
|
||||||
@ -726,6 +726,11 @@ function Squad.cleanSquads(tick)
|
|||||||
Squad.squadDispatch(squad, tick)
|
Squad.squadDispatch(squad, tick)
|
||||||
elseif (squad.commandTick and (squad.commandTick < tick)) then
|
elseif (squad.commandTick and (squad.commandTick < tick)) then
|
||||||
if squad.wanders > 5 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()
|
squad.group.destroy()
|
||||||
else
|
else
|
||||||
squad.wanders = squad.wanders + 1
|
squad.wanders = squad.wanders + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user