Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
SAM site stays after being sold during low-power #7442
changed the title from
Sam site stays after being sold
SAM site stays after being sold
Feb 8, 2015
This behaviour is induced by the AttackFollow Activity, which the SAM site has every tick, even when powered down.
Subsequently https://github.com/OpenRA/OpenRA/blob/bleed/OpenRA.Mods.Common/Traits/Attack/AttackFollow.cs#L74 will return early without going to the next activity (being sold).
I changed that line to return NextActivity, and selling a powered down, attacking SAM site worked fine. I am not sure what other side effects this has as I guess there is a reason why a disabled actor in AttackFollow mode should not do anything else.
I think I found out why it isn't always repoducible. In
All the activities are cancelled before selling the building. But the animation will take some time to sell, so a new attack activity can be placed in the queue blocking the eventually sell (after the animation). I have proposed another fix in #7544,
Selling should take the building lock. I think we shouldn't be queuing any
Is this not right? It would mean that capture in progress prevents firing
On Mon, Mar 2, 2015 at 7:42 AM, Peter Evers email@example.com
@chrisforbes I think that would indeed mean that capturing a building would immediately disable attack moves which isn't preferred in my opinion
I outputted the queue activity in this situation:
So preventing attack activities on disabled buildings may fix this bug and also improve a lot on efficiency I think. I'll try that out now.