Skip to content

Commit faea46e

Browse files
committed
Renamed enum value and added support for local offline games
1 parent a0ea47b commit faea46e

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

AuroraGSI-RL/AuroraGSI.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,18 @@ void AuroraGSI::ResetStates()
149149
}
150150

151151
ServerWrapper AuroraGSI::GetCurrentGameType() {
152-
if (this->gameWrapper->IsInReplay()) {
153-
GameState.Status = GameStatus::Replay;
154-
return this->gameWrapper->GetGameEventAsReplay();
152+
if (this->gameWrapper->IsInOnlineGame()) {
153+
GameState.Status = GameStatus::InGame;
154+
return this->gameWrapper->GetOnlineGame();
155155
}
156-
else if (this->gameWrapper->IsInOnlineGame()) {
157-
GameState.Status = GameStatus::OnlineGame;
156+
else if (this->gameWrapper->IsSpectatingInOnlineGame()) {
157+
GameState.Status = GameStatus::Spectate;
158158
return this->gameWrapper->GetOnlineGame();
159159
}
160+
else if (this->gameWrapper->IsInReplay()) {
161+
GameState.Status = GameStatus::Replay;
162+
return this->gameWrapper->GetGameEventAsReplay();
163+
}
160164
else if (this->gameWrapper->IsInFreeplay()) {
161165
GameState.Status = GameStatus::Freeplay;
162166
return this->gameWrapper->GetGameEventAsServer();
@@ -165,14 +169,13 @@ ServerWrapper AuroraGSI::GetCurrentGameType() {
165169
GameState.Status = GameStatus::Training;
166170
return this->gameWrapper->GetGameEventAsServer();
167171
}
168-
else if (this->gameWrapper->IsSpectatingInOnlineGame()) {
169-
GameState.Status = GameStatus::Spectate;
170-
return this->gameWrapper->GetOnlineGame();
172+
else if (this->gameWrapper->IsInGame()) {
173+
GameState.Status = GameStatus::InGame;
174+
return this->gameWrapper->GetGameEventAsServer();
171175
}
172176
else {
173177
GameState.Status = GameStatus::Menu;
174178
return NULL;
175179
}
176180
}
177-
#pragma endregion
178-
181+
#pragma endregion

AuroraGSI-RL/GameStateNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ enum class GameStatus
88
{
99
Menu = -1,
1010
Replay,
11-
OnlineGame,
11+
InGame,
1212
Freeplay,
1313
Training,
1414
Spectate

0 commit comments

Comments
 (0)