Skip to content

Commit

Permalink
Fix Freecam integration
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieEldridge committed Oct 6, 2024
1 parent 2fdc702 commit 2116165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions M2TWEOP Code/M2TWEOP GUI/gameRunnerUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace gameRunnerUI

void maintainGUI()
{
if ((startProcess.isRunEnded == true && startProcess.isGetResponse == true))
if (startProcess.isRunEnded == true && startProcess.isGetResponse == true)
{
std::this_thread::sleep_for(std::chrono::seconds(3));
if (helpers::isProcessRunning(dataG::data.gameData.exeName) == false)
Expand All @@ -109,7 +109,7 @@ namespace gameRunnerUI
exit(0);
}
}
if ((dataG::data.gameData.freecamIntegration == true && dataG::data.gameData.freecamStarted == false && helpers::isProcessRunning(dataG::data.gameData.exeName) == true))
if ((dataG::data.gameData.freecamIntegration == true) && (dataG::data.gameData.freecamStarted == false) && (helpers::isProcessRunning(dataG::data.gameData.exeName) == true))
{
std::this_thread::sleep_for(std::chrono::seconds(5));
// Open Freecam if we are using the integration after waiting a bit for the game to start
Expand Down
6 changes: 3 additions & 3 deletions M2TWEOP Code/M2TWEOP GUI/mainUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace mainUI
bool isModSettingsUIOpen = false;

bool isGameRunnerUIOpen = false;
bool isDiscordUIOpen = false;
bool keepGuiOpen = false;
} childs;

void tryJustStartMod()
Expand Down Expand Up @@ -63,11 +63,11 @@ namespace mainUI
{
int openStatus = gameRunnerUI::drawUI(&childs.isGameRunnerUIOpen);
if (openStatus == 2) {
childs.isDiscordUIOpen = true;
childs.keepGuiOpen = true;
}
return 0;
}
else if (childs.isDiscordUIOpen == true || dataG::data.gameData.freecamIntegration == true)
else if (childs.keepGuiOpen == true)
{
gameRunnerUI::maintainGUI();
return 0;
Expand Down

0 comments on commit 2116165

Please sign in to comment.