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

Add FULL action to :droid command. #4147

Merged
merged 1 commit into from Jul 7, 2019

Conversation

@Pentarctagon
Copy link
Member

commented Jul 3, 2019

:droid FULL will also set the side controller to AI, whereas ON only sets the proxy_controller.
This results in a situation where if an opponent leaves and is droided, the host will have vision to the side of the player who left.
This also results in the host not having vision to their original side again until it's their turn.

Fixes #3665

@ProditorMagnus

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

Is "droid full" possible to undo?

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Jul 3, 2019

Yes - :droid off still gives the human player full control and :droid on still gives the human player vision but has the AI play, even if :droid full was used on the side previously.

@ProditorMagnus

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

I guess it is workaround to be able to use 1.12 style droid.

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Jul 3, 2019

Mostly it was motivated by when I played a few Auction X matches, someone left, and I got annoyed that even though I droided the side it still left me only able to see the leaver's side once it became their turn until it was my turn again. It was especially annoying when that side had no units left, so then I couldn't see anything at all until it was my original side's turn again.

@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

Note that make_ai only changes the controller on your clieny so to other players it will still appear as if you controlled that side.

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

The wiki already documents that a side's controller value isn't MP safe, so I'm okay with that unless it would cause other issues elsewhere.

@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

The wiki already documents that a side's controller value isn't MP safe

This is iirc only partly true. In particular the game engine itself uses the 'controller' property at game end to determine whether a game should proceed to the next scenario or not in (sp and mp) campaigns ( see check_victory function).

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

Based on el_data.proceed_to_next_level = found_player || found_network_player; from play_controller.cpp, as long as all sides aren't AI controlled, it would proceed to the next level there. So someone would need to intentionally do :droid full on every side, in which case not proceeding looks like it's the expected action anyway.

@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

Those found_player || found_network_player only count non-defeated sides iirc, so when only one player side was undefeated at the end and it was droided fully, it might cause it's owner side to wrongly come to the conclusion that the scenario might not change could continue.

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2019

Alright, I'll make sure I document that on the wiki after this is merged.

@ProditorMagnus

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

Document something in :help too.

@Pentarctagon Pentarctagon force-pushed the Pentarctagon:droid-full branch from babfa30 to f6e11a3 Jul 5, 2019

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2019

src/menu_events.cpp Outdated Show resolved Hide resolved
Add FULL action to :droid command.
:droid FULL will also set the side controller to AI, whereas ON only sets the proxy_controller.
This results in a situation where if an opponent leaves and is droided, the host will have vision to the side of the player who left.
This also results in the host *not* having vision to their original side again until it's their turn.

Fixes #3665

@Pentarctagon Pentarctagon force-pushed the Pentarctagon:droid-full branch from f6e11a3 to e1eeccf Jul 5, 2019

@Pentarctagon Pentarctagon merged commit efd808e into wesnoth:master Jul 7, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.