Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't recapture infrastructure #1952

Closed
panguitch opened this issue Jun 19, 2017 · 3 comments
Closed

Can't recapture infrastructure #1952

panguitch opened this issue Jun 19, 2017 · 3 comments
Labels
Problem A problem, bug, defect - something to fix

Comments

@panguitch
Copy link

In testing recent game changes and their effect on Greyhawk Wars I've come across a new error. An infrastructure unit that used to be capturable and recapturable between two players now can be captured but not recaptured.

Example:

Here are two saved games (in zip) demonstrating the problem: Recaptured bug.zip

IuzRecaptured.tsvg is played on 1.9.0.0.3635. It shows Iuz moving its leader Iuz_the_Old (a factory unit of sorts) into a neutral territory. The battle is lost and Neutral captures Iuz_the_Old, triggering various notifications and production rule changes for Iuz. Round 2: Iuz conquers the neutral terriotry, recapturing Iuz_the_Old. All is right with the world.

FuryondyNotRecaptured.tsvg is played on 1.9.0.0.5043 and manifests this new problem. It shows Furyondy moving its leader Belvor_IV into a neutral territory. Battle is lost, Neutral captures Belvor_IV. Round 2: Furyondy conquers the neutral terriotry, but Belvor_IV is destroyed instead of recaptured. Sad Furyondy :(

These leader units are infrastructure/factories which also function as support units. They are destroyed when captured by other players, but not by Neutral or the originating player, which should be able to capture and recapture them back and forth.

This problem may be unique to Greyhawk Wars or to offensive infrastructure/support units. I tried it in Pact of Steel and there's no problem with those immobile/defensive factories or AA being captured and recaptured back and forth between Germany and Russia.

I wonder if it has something to do with the fix @ron-murhammer made in response to another of my issues: #1827 since it was also related to infrastructure units with support attachments? Or is it caused by some other recent change?

@ron-murhammer
Copy link
Member

ron-murhammer commented Jun 20, 2017

The bug appears to be due to #1646

This line destroys infra units before considering whether to capture them:

remove(m_defendingUnits, bridge, m_battleSite, true);

@ron-murhammer
Copy link
Member

@panguitch This should now be fixed in the latest pre-release. Please test and confirm. Nice work spotting this as well!

@panguitch
Copy link
Author

@ron-murhammer Yes, tested in 5060 and works great now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Problem A problem, bug, defect - something to fix
Projects
None yet
Development

No branches or pull requests

2 participants