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

Fix #6468: Load correct version of AI as specified during the time of its save. #7193

Open
wants to merge 1 commit into
base: master
from

Conversation

@SamuXarick
Copy link
Contributor

SamuXarick commented Feb 7, 2019

No description provided.

if (strcasecmp(ai_name, i->GetName()) == 0 && i->CanLoadFromVersion(versionParam) && (version == -1 || i->GetVersion() > version)) {
version = (*it).second->GetVersion();
info = i;
if (versionParam != -2) {

This comment has been minimized.

Copy link
@LordAro

LordAro Feb 23, 2019

Member

Not a fan of this "magic" -2 value. What's wrong with using versionParam "as is" ? It's documented as "The version of the game script, or -1 if you want the latest"

if (strcasecmp(ai_name, i->GetName()) == 0 && i->CanLoadFromVersion(versionParam) && (version == -1 || i->GetVersion() > version)) {
version = (*it).second->GetVersion();
info = i;
if (versionParam != -2) {

This comment has been minimized.

Copy link
@LordAro

LordAro Feb 23, 2019

Member

This is also basically identical to the GS version, I think differing only in AIInfo & GameInfo types? Can this be split out into a (templated?) function?

@SamuXarick SamuXarick force-pushed the SamuXarick:load-specific-ai-version branch from 2e3f65c to 5b40c05 Mar 1, 2019
@TrueBrain

This comment has been minimized.

Copy link
Member

TrueBrain commented Mar 2, 2019

Friendly poke; this is currently waiting on @SamuXarick (the author).

@SamuXarick

This comment has been minimized.

Copy link
Contributor Author

SamuXarick commented Mar 2, 2019

@SamuXarick

This comment has been minimized.

Copy link
Contributor Author

SamuXarick commented Mar 2, 2019

I need several versions of the same AI to re-test this. I have my own AI uploaded to bananas which would be useful, but I can only download the latest version. I thought I could download old versions at any time, so I deleted my old versions from disk.

@SamuXarick SamuXarick force-pushed the SamuXarick:load-specific-ai-version branch from 007f3aa to f932cd5 Mar 2, 2019
@SamuXarick

This comment has been minimized.

Copy link
Contributor Author

SamuXarick commented Mar 4, 2019

This is currently awaiting review, again

@stale

This comment has been minimized.

Copy link

stale bot commented Apr 3, 2019

This pull request has been automatically marked as stale because it has not had any activity in the last month.
Please feel free to give a status update now, ping for review, or re-open when it's ready.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale label Apr 3, 2019
@SamuXarick SamuXarick force-pushed the SamuXarick:load-specific-ai-version branch from f932cd5 to e6ca553 Apr 7, 2019
@stale stale bot removed the stale label Apr 7, 2019
@SamuXarick SamuXarick force-pushed the SamuXarick:load-specific-ai-version branch 2 times, most recently from 87fba74 to 004843f Apr 11, 2019
@stale

This comment has been minimized.

Copy link

stale bot commented May 13, 2019

This pull request has been automatically marked as stale because it has not had any activity in the last month.
Please feel free to give a status update now, ping for review, or re-open when it's ready.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale label May 13, 2019
@SamuXarick SamuXarick force-pushed the SamuXarick:load-specific-ai-version branch from 004843f to e7fac8c Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.