forked from TheSuperHackers/GeneralsGameCode
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathNGMPGame_fixed.cpp
More file actions
58 lines (48 loc) · 1.37 KB
/
NGMPGame_fixed.cpp
File metadata and controls
58 lines (48 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "GameNetwork/GeneralsOnline/NGMPGame.h"
#include "GameLogic/VictoryConditions.h"
#include "Common/PlayerList.h"
#include "GameLogic/GameLogic.h"
#include "GameNetwork/FileTransfer.h"
#include "GameClient/MapUtil.h"
#include "GameClient/GameText.h"
#include "GameNetwork/GameSpyOverlay.h"
#include "Common/RandomValue.h"
#include "GameNetwork/GeneralsOnline/NGMP_interfaces.h"
#include "GameNetwork/NetworkInterface.h"
#include "Common/GlobalData.h"
#include "GameClient/View.h"
NGMPGameSlot::NGMPGameSlot()
{
GameSlot();
m_profileID = 0;
m_wins = 0;
m_losses = 0;
m_rankPoints = 0;
m_favoriteSide = 0;
m_pingInt = 0;
m_profileID = 0;
m_pingStr.clear();
}
// NGMPGame ----------------------------------------
NGMPGame::NGMPGame()
{
// Initialize slot pointers first to ensure they're valid
cleanUpSlotPointers();
NGMP_OnlineServices_LobbyInterface* pLobbyInterface = NGMP_OnlineServicesManager::GetInterface<NGMP_OnlineServices_LobbyInterface>();
if (pLobbyInterface == nullptr)
{
// Ensure m_inGame is set to false even if we return early
m_inGame = false;
return;
}
setLocalIP(0);
m_ladderIP.clear();
m_ladderPort = 0;
enterGame(); // this is done on join in the GS impl, and must be called before setMap
// NGMP: Store map
setMap(pLobbyInterface->GetCurrentLobbyMapPath());
// init
//init();
// NGMP: Populate slots
UpdateSlotsFromCurrentLobby();
}