[PATCH] bug in GarrisonHolder
There is a problem in OnHealthChanged of GarrisonHolder which pass this.entities as argument to functions which will eventually remove elements to this.entities inside a do loop on the argument array. This patch copy the array before passing it.
In addition, in the EjectOrKill function, we could have remaining entities which were neither killed nor ejected in the case of failed ejection. This patch reorder the function on order to prevent this.
Change History
(4)
Component: |
Core engine → UI & Simulation
|
Owner: |
set to leper
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Looks good. Any specific reason why the PostMessage is in the loop and not after it? I guess that is an oversight from when that code was originally written.