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

Debug piracy issue #127

Merged
merged 3 commits into from May 1, 2019
Merged

Conversation

LynxAbraxas
Copy link
Contributor

This PR solves the issue of #75, i.e. that the player does not get a colored square in the piracy column of the trade manager, nor the diplomatic option to ask for stopping piracy (#116) and is the base for PRs like #125 and #126.

@LynxAbraxas
Copy link
Contributor Author

LynxAbraxas commented Apr 30, 2019

@MartinGuehmann what would you suggest to do with StopPirating in AutoAddOrders

StopPirating();

and AutoAddOrdersWrongTurn
StopPirating();

, same code snippet as well? Do you know when those are called?

…rdersWrongTurn:

since it won't hurt if not used but would ensure behavior acco. to 58050b8 if called
@LynxAbraxas
Copy link
Contributor Author

Wonderful! Works as expected and solves #75 and #116.
@MartinGuehmann Can go in from my side.

@MartinGuehmann
Copy link
Collaborator

, same code snippet as well? Do you know when those are called?

As you have already figured out: Yes. And then we wait for Travis.

@LynxAbraxas
Copy link
Contributor Author

And then we wait for Travis.

Of corse (it had finished with the old ones but I just noticed I still had the debug fprintf in).
I'll start rebasing the other PRs on to this to sort things out a bit.

@MartinGuehmann
Copy link
Collaborator

Then this can go in.

@MartinGuehmann MartinGuehmann merged commit 71a6ab0 into civctp2:master May 1, 2019
@LynxAbraxas
Copy link
Contributor Author

LynxAbraxas commented May 1, 2019

Great! This bug really bugged me. Many thanks @MartinGuehmann for helping to solve this.
It seems that it also has an interesting effect on the AI players. I guess that the AI players only got to know the pirating from the human player and not from the other AIs because of this bug. This might increase diplomatic interaction between the AI players.
I also observed that the pirating animation of AI units now only happens once (while it used to happen every turn, see e.g. the test game I uploaded) because the pirating order stays over turns as long as no action is taken that "turns it off". Perhaps this even stops the AI from trying to use transporters for pirating (have to observe this for longer).

@MartinGuehmann Would you say that this bug already was in the original version of cpt2 or was it introduced when pimping up the AI, making special use of AddOrder then?
Do you know when AutoAddOrders and AutoAddOrdersWrongTurn are used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants