|
|
@ -114,16 +114,13 @@ static ENetError s_authResult = kNetErrAuthenticationFailed; |
|
|
|
static plString s_authSrvAddr; |
|
|
|
static plString s_authSrvAddr; |
|
|
|
static plString s_fileSrvAddr; |
|
|
|
static plString s_fileSrvAddr; |
|
|
|
|
|
|
|
|
|
|
|
static char s_iniServerAddr[256]; |
|
|
|
|
|
|
|
static char s_iniFileServerAddr[256]; |
|
|
|
|
|
|
|
static plString s_iniAccountUsername; |
|
|
|
static plString s_iniAccountUsername; |
|
|
|
static ShaDigest s_namePassHash; |
|
|
|
static ShaDigest s_namePassHash; |
|
|
|
static wchar_t s_iniAuthToken[kMaxPublisherAuthKeyLength]; |
|
|
|
static wchar_t s_iniAuthToken[kMaxPublisherAuthKeyLength]; |
|
|
|
static wchar_t s_iniOS[kMaxGTOSIdLength]; |
|
|
|
static wchar_t s_iniOS[kMaxGTOSIdLength]; |
|
|
|
static bool s_iniReadAccountInfo = true; |
|
|
|
static plString s_iniStartupAgeName = "StartUp"; |
|
|
|
static plString s_iniStartupAgeName; |
|
|
|
|
|
|
|
static plUUID s_iniStartupAgeInstId; |
|
|
|
static plUUID s_iniStartupAgeInstId; |
|
|
|
static plString s_iniStartupPlayerName; |
|
|
|
static unsigned s_iniStartupPlayerId = 0; |
|
|
|
static bool s_netError = false; |
|
|
|
static bool s_netError = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -408,7 +405,7 @@ static void INetCliAuthLoginRequestCallback ( |
|
|
|
s_players[i].explorer = playerInfoArr[i].explorer; |
|
|
|
s_players[i].explorer = playerInfoArr[i].explorer; |
|
|
|
s_players[i].playerName = playerInfoArr[i].playerName; |
|
|
|
s_players[i].playerName = playerInfoArr[i].playerName; |
|
|
|
s_players[i].avatarDatasetName = playerInfoArr[i].avatarShape; |
|
|
|
s_players[i].avatarDatasetName = playerInfoArr[i].avatarShape; |
|
|
|
if (!wantsStartUpAge && s_players[i].playerName.CompareI(s_iniStartupPlayerName) == 0) |
|
|
|
if (!wantsStartUpAge && s_players[i].playerInt == s_iniStartupPlayerId) |
|
|
|
s_player = &s_players[i]; |
|
|
|
s_player = &s_players[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -700,6 +697,16 @@ bool NetCommIsLoginComplete() { |
|
|
|
return s_loginComplete; |
|
|
|
return s_loginComplete; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
void NetCommSetIniPlayerId(unsigned playerId) { |
|
|
|
|
|
|
|
s_iniStartupPlayerId = playerId; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
void NetCommSetIniStartUpAge(const plString& ageName) { |
|
|
|
|
|
|
|
s_iniStartupAgeName = ageName; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//============================================================================
|
|
|
|
const NetCommAge * NetCommGetAge () { |
|
|
|
const NetCommAge * NetCommGetAge () { |
|
|
|
return &s_age; |
|
|
|
return &s_age; |
|
|
@ -741,8 +748,6 @@ void NetCommStartup () { |
|
|
|
|
|
|
|
|
|
|
|
// Set startup age info
|
|
|
|
// Set startup age info
|
|
|
|
memset(&s_startupAge, 0, sizeof(s_startupAge)); |
|
|
|
memset(&s_startupAge, 0, sizeof(s_startupAge)); |
|
|
|
|
|
|
|
|
|
|
|
s_iniStartupAgeName = "StartUp"; |
|
|
|
|
|
|
|
s_startupAge.ageDatasetName = s_iniStartupAgeName; |
|
|
|
s_startupAge.ageDatasetName = s_iniStartupAgeName; |
|
|
|
|
|
|
|
|
|
|
|
s_startupAge.ageInstId = s_iniStartupAgeInstId; |
|
|
|
s_startupAge.ageInstId = s_iniStartupAgeInstId; |
|
|
@ -1010,8 +1015,6 @@ void NetCommSetAccountUsernamePassword ( |
|
|
|
) { |
|
|
|
) { |
|
|
|
s_iniAccountUsername = username; |
|
|
|
s_iniAccountUsername = username; |
|
|
|
memcpy(s_namePassHash, namePassHash, sizeof(ShaDigest)); |
|
|
|
memcpy(s_namePassHash, namePassHash, sizeof(ShaDigest)); |
|
|
|
|
|
|
|
|
|
|
|
s_iniReadAccountInfo = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//============================================================================
|
|
|
@ -1030,11 +1033,6 @@ ENetError NetCommGetAuthResult () { |
|
|
|
return s_authResult; |
|
|
|
return s_authResult; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
void NetCommSetReadIniAccountInfo(bool readFromIni) { |
|
|
|
|
|
|
|
s_iniReadAccountInfo = readFromIni; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//============================================================================
|
|
|
|
void NetCommAuthenticate ( |
|
|
|
void NetCommAuthenticate ( |
|
|
|
void * param |
|
|
|
void * param |
|
|
@ -1105,10 +1103,6 @@ void NetCommSetActivePlayer (//--> plNetCommActivePlayerMsg |
|
|
|
s_player = &s_players[i]; |
|
|
|
s_player = &s_players[i]; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (s_players[i].playerName.CompareI(s_iniStartupPlayerName) == 0) { |
|
|
|
|
|
|
|
playerInt = s_players[i].playerInt; |
|
|
|
|
|
|
|
s_player = &s_players[i]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
ASSERT(s_player); |
|
|
|
ASSERT(s_player); |
|
|
|
} |
|
|
|
} |
|
|
|