22#include " AuroraGSI.h"
33
44// using std::placeholders::_1;
5- BAKKESMOD_PLUGIN (AuroraGSI, " AuroraGSI" , " 0.0.2 " , PLUGINTYPE_THREADED)
5+ BAKKESMOD_PLUGIN (AuroraGSI, " AuroraGSI" , " 0.1.0 " , PLUGINTYPE_THREADED)
66
77#pragma region Plugin Methods
88void AuroraGSI::onLoad ()
@@ -116,16 +116,18 @@ void AuroraGSI::UpdateState(ServerWrapper wrapper)
116116 }
117117
118118 GameSettingPlaylistWrapper playlistWrapper = wrapper.GetPlaylist ();
119- if (playlistWrapper.memory_address != NULL ) {
120- GameState.Match .Mode = playlistWrapper.GetPlaylistId ();
121- }
119+ if (playlistWrapper.memory_address != NULL )
120+ GameState.Match .Playlist = playlistWrapper.GetPlaylistId ();
121+ else
122+ GameState.Match .Playlist = -1 ;
122123}
123124
124125
125126void AuroraGSI::ResetStates ()
126127{
127- GameState.Match .Mode = -1 ;
128- GameState.Match .Type = MatchType::Menu;
128+ GameState.Status = GameStatus::Menu;
129+
130+ GameState.Match .Playlist = -1 ;
129131 GameState.Match .Time = -1 ;
130132 GameState.Match .Teams [0 ].Index = -1 ;
131133 GameState.Match .Teams [0 ].Goals = -1 ;
@@ -151,27 +153,27 @@ void AuroraGSI::ResetStates()
151153
152154ServerWrapper AuroraGSI::GetCurrentGameType () {
153155 if (this ->gameWrapper ->IsInReplay ()) {
154- GameState.Match . Type = MatchType ::Replay;
156+ GameState.Status = GameStatus ::Replay;
155157 return this ->gameWrapper ->GetGameEventAsReplay ();
156158 }
157159 else if (this ->gameWrapper ->IsInOnlineGame ()) {
158- GameState.Match . Type = MatchType ::OnlineGame;
160+ GameState.Status = GameStatus ::OnlineGame;
159161 return this ->gameWrapper ->GetOnlineGame ();
160162 }
161163 else if (this ->gameWrapper ->IsInFreeplay ()) {
162- GameState.Match . Type = MatchType ::Freeplay;
164+ GameState.Status = GameStatus ::Freeplay;
163165 return this ->gameWrapper ->GetGameEventAsServer ();
164166 }
165167 else if (this ->gameWrapper ->IsInCustomTraining ()) {
166- GameState.Match . Type = MatchType ::Training;
168+ GameState.Status = GameStatus ::Training;
167169 return this ->gameWrapper ->GetGameEventAsServer ();
168170 }
169171 else if (this ->gameWrapper ->IsSpectatingInOnlineGame ()) {
170- GameState.Match . Type = MatchType ::Spectate;
172+ GameState.Status = GameStatus ::Spectate;
171173 return this ->gameWrapper ->GetOnlineGame ();
172174 }
173175 else {
174- GameState.Match . Type = MatchType ::Menu;
176+ GameState.Status = GameStatus ::Menu;
175177 return NULL ;
176178 }
177179}
0 commit comments