-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Part of a small fix on GlobalVariables #1247
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well written, only tweaks and if there are no new reviewers I suggest label it with the "Needs testing"
@@ -301,6 +301,7 @@ This page lists all the individual contributions to the project by their author. | |||
- **FlyStar** | |||
- Campaign load screen PCX support | |||
- New condition for automatic self-destruction logic when TechnoTypes exist/don't exist | |||
- GlobalVariable Passing fix, AltNextScenario fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 different/unrelated fixes, in 2 lines, not in the same line.
if (bIsGlobal) | ||
{ | ||
ScenarioExt::Global()->LoadVariablesToFile(true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (bIsGlobal) | |
{ | |
ScenarioExt::Global()->LoadVariablesToFile(true); | |
} | |
if (bIsGlobal) | |
ScenarioExt::Global()->LoadVariablesToFile(true); |
if (!Phobos::Config::SaveVariablesOnScenarioEnd) | ||
{ | ||
// Is it better not to delete the file? | ||
DeleteFileA(fileName); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!Phobos::Config::SaveVariablesOnScenarioEnd) | |
{ | |
// Is it better not to delete the file? | |
DeleteFileA(fileName); | |
} | |
if (!Phobos::Config::SaveVariablesOnScenarioEnd) | |
DeleteFileA(fileName); // Is it better not to delete the file? |
ScenarioExt::Global()->LoadVariablesToFile(true); | ||
|
||
return 0x4C622F; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScenarioExt::Global()->LoadVariablesToFile(true); | |
return 0x4C622F; | |
ScenarioExt::Global()->LoadVariablesToFile(true); | |
return 0x4C622F; |
if (strcmp(ScenarioClass::Instance->NextScenario, "")) | ||
{ | ||
return NextScenario; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (strcmp(ScenarioClass::Instance->NextScenario, "")) | |
{ | |
return NextScenario; | |
} | |
if (strcmp(ScenarioClass::Instance->NextScenario, "")) | |
return NextScenario; |
Previously while using phobos I noticed that the game was passing GlobalVariables with an error. due to a technical glitch I couldn't get to the root of the problem so I opted for an alternative method of exporting globals.ini and re-reading the parameters.
PS: There may be a better way, but that's not something I can do anymore.