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

Fixed bug in map Retry Install #14410

Merged
merged 2 commits into from Nov 27, 2017
Merged

Fixed bug in map Retry Install #14410

merged 2 commits into from Nov 27, 2017

Conversation

@dsimmons87
Copy link
Contributor

dsimmons87 commented Nov 23, 2017

If the download failed, the map status would be MapStatus.DownloadError,
which would cause the Install method to return immediately. I've updated
the Install method now to account for MapStatus.DownloadError.

In reference to issue #6196

@@ -418,7 +418,7 @@ public void UpdateRemoteSearch(MapStatus status, MiniYaml yaml, Action<MapPrevie

public void Install(string mapRepositoryUrl, Action onSuccess)
{
if (Status != MapStatus.DownloadAvailable || !Game.Settings.Game.AllowDownloading)
if (Status != MapStatus.DownloadError && (Status != MapStatus.DownloadAvailable || !Game.Settings.Game.AllowDownloading))

This comment has been minimized.

Copy link
@pchote

pchote Nov 23, 2017

Member

This should be ((Status != MapStatus.DownloadError && Status != MapStatus.DownloadAvailable) || !Game.Settings.Game.AllowDownloading). We want to unconditionally exit here if the player has disabled map downloading!

This comment has been minimized.

Copy link
@dsimmons87

dsimmons87 Nov 23, 2017

Author Contributor

Makes sense

If the download failed, the map status would be MapStatus.DownloadError,
which would cause the Install method to return immediately. I've updated
the Install method now to account for MapStatus.DownloadError.
@dsimmons87 dsimmons87 force-pushed the dsimmons87:bleed branch from 29f1d8c to d94125f Nov 23, 2017
@pchote
pchote approved these changes Nov 23, 2017
@pchote pchote added the PR: Needs +2 label Nov 23, 2017
@pchote

This comment has been minimized.

Copy link
Member

pchote commented Nov 23, 2017

Simple repro case for testing:

  1. Download and install a custom map from the resource center.
  2. Start a local dedicated server with Server.Map=<custom map UID>.
  3. Delete the custom map from the local maps dir. Don't quit the server after this.
  4. Start the game with Launch.Connect=localhost:1234 to launch and immediately join the server.
  5. Click install. If the download starts then quit the game before it completes, and repeat steps 4/5 until it fails.
  6. Before the fix: pressing the retry button doesn't work and the map cannot be installed without a game restart. After the fix: pressing the retry button works and the map will eventually install once the resource center decides to cooperate.
@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Nov 26, 2017

Looks good, but the merge commit needs to be removed before we can merge this.

@pchote

This comment has been minimized.

Copy link
Member

pchote commented Nov 26, 2017

That will automatically vanish when we do the rebase merge.

@penev92 penev92 merged commit 65a2410 into OpenRA:bleed Nov 27, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@penev92

This comment has been minimized.

Copy link
Member

penev92 commented Nov 27, 2017

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.