Compare commits
No commits in common. "19015c097c41a59107c62487a11273047fccb219" and "dc95076faa2a597c33252fa29a9dc93329d97be6" have entirely different histories.
19015c097c
...
dc95076faa
|
@ -136,7 +136,7 @@ Steam_Client *get_steam_clientserver_old()
|
|||
static bool steamclient_has_ipv6_functions_flag;
|
||||
bool steamclient_has_ipv6_functions()
|
||||
{
|
||||
return steamclient_has_ipv6_functions_flag || get_steam_client()->gameserver_has_ipv6_functions;
|
||||
return steamclient_has_ipv6_functions_flag;
|
||||
}
|
||||
|
||||
static void *create_client_interface(const char *ver)
|
||||
|
|
|
@ -5843,14 +5843,13 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation( IStea
|
|||
return self->GetServerReputation();
|
||||
}
|
||||
|
||||
STEAMAPI_API void *SteamAPI_ISteamGameServer_GetPublicIP( intptr_t instancePtr, void *instancePtr_possible )
|
||||
STEAMAPI_API uint32 SteamAPI_ISteamGameServer_GetPublicIP( intptr_t instancePtr, void *instancePtr_possible )
|
||||
{
|
||||
//abuse call convention rules to get this working.
|
||||
//TODO: check if this actually works (ret value changed from uint32 to struct)
|
||||
if (steamclient_has_ipv6_functions()) {
|
||||
get_steam_client()->steam_gameserver->GetPublicIP_fix((SteamIPAddress_t *)instancePtr);
|
||||
return (void *)instancePtr;
|
||||
return ((ISteamGameServer012 *)instancePtr_possible)->GetPublicIP_old();
|
||||
} else {
|
||||
return (void *)((ISteamGameServer012 *)instancePtr)->GetPublicIP_old();
|
||||
return ((ISteamGameServer012 *)instancePtr)->GetPublicIP_old();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,8 +109,6 @@ Steam_Client::Steam_Client()
|
|||
steam_gameserver_game_coordinator = new Steam_Game_Coordinator(settings_server, network, callback_results_server, callbacks_server, run_every_runcb);
|
||||
steam_masterserver_updater = new Steam_Masterserver_Updater(settings_server, network, callback_results_server, callbacks_server, run_every_runcb);
|
||||
|
||||
gameserver_has_ipv6_functions = false;
|
||||
|
||||
last_cb_run = 0;
|
||||
PRINT_DEBUG("client init end\n");
|
||||
}
|
||||
|
@ -305,10 +303,8 @@ ISteamGameServer *Steam_Client::GetISteamGameServer( HSteamUser hSteamUser, HSte
|
|||
} else if (strcmp(pchVersion, "SteamGameServer012") == 0) {
|
||||
return (ISteamGameServer *)(void *)(ISteamGameServer012 *)steam_gameserver;
|
||||
} else if (strcmp(pchVersion, STEAMGAMESERVER_INTERFACE_VERSION) == 0) {
|
||||
gameserver_has_ipv6_functions = true;
|
||||
return (ISteamGameServer *)(void *)(ISteamGameServer *)steam_gameserver;
|
||||
} else {
|
||||
gameserver_has_ipv6_functions = true;
|
||||
return (ISteamGameServer *)(void *)(ISteamGameServer *)steam_gameserver;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,8 +139,6 @@ public:
|
|||
unsigned steam_pipe_counter = 1;
|
||||
std::map<HSteamPipe, enum Steam_Pipe> steam_pipes;
|
||||
|
||||
bool gameserver_has_ipv6_functions;
|
||||
|
||||
Steam_Client();
|
||||
~Steam_Client();
|
||||
// Creates a communication pipe to the Steam client.
|
||||
|
|
|
@ -559,12 +559,6 @@ SteamIPAddress_t Steam_GameServer::GetPublicIP()
|
|||
return ip;
|
||||
}
|
||||
|
||||
void Steam_GameServer::GetPublicIP_fix(SteamIPAddress_t *out)
|
||||
{
|
||||
PRINT_DEBUG("GetPublicIP_fix\n");
|
||||
if (out) *out = GetPublicIP();
|
||||
}
|
||||
|
||||
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
|
||||
// socket to talk to the master server on, it lets the game use its socket to forward messages
|
||||
// back and forth. This prevents us from requiring server ops to open up yet another port
|
||||
|
|
|
@ -278,7 +278,6 @@ public:
|
|||
// connect to
|
||||
uint32 GetPublicIP_old();
|
||||
SteamIPAddress_t GetPublicIP();
|
||||
void GetPublicIP_fix(SteamIPAddress_t *out);
|
||||
|
||||
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
|
||||
// socket to talk to the master server on, it lets the game use its socket to forward messages
|
||||
|
|
|
@ -239,7 +239,6 @@ bool GetAchievement( const char *pchName, bool *pbAchieved )
|
|||
|
||||
try {
|
||||
auto it = defined_achievements_find(pchName);
|
||||
if (it == defined_achievements.end()) return false;
|
||||
std::string pch_name = it->value("name", std::string());
|
||||
|
||||
auto ach = user_achievements.find(pch_name);
|
||||
|
@ -262,7 +261,6 @@ bool SetAchievement( const char *pchName )
|
|||
|
||||
try {
|
||||
auto it = defined_achievements_find(pchName);
|
||||
if (it == defined_achievements.end()) return false;
|
||||
std::string pch_name = it->value("name", std::string());
|
||||
|
||||
if (it != defined_achievements.end()) {
|
||||
|
@ -290,7 +288,6 @@ bool ClearAchievement( const char *pchName )
|
|||
|
||||
try {
|
||||
auto it = defined_achievements_find(pchName);
|
||||
if (it == defined_achievements.end()) return false;
|
||||
std::string pch_name = it->value("name", std::string());
|
||||
|
||||
if (it != defined_achievements.end()) {
|
||||
|
@ -316,7 +313,6 @@ bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32
|
|||
|
||||
try {
|
||||
auto it = defined_achievements_find(pchName);
|
||||
if (it == defined_achievements.end()) return false;
|
||||
std::string pch_name = it->value("name", std::string());
|
||||
|
||||
auto ach = user_achievements.find(pch_name);
|
||||
|
@ -421,8 +417,6 @@ bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint
|
|||
|
||||
try {
|
||||
auto it = defined_achievements_find(pchName);
|
||||
if (it == defined_achievements.end()) return false;
|
||||
|
||||
std::string pch_name = it->value("name", std::string());
|
||||
|
||||
auto ach = user_achievements.find(pch_name);
|
||||
|
|
Loading…
Reference in New Issue