diff --git a/dll/flat.cpp b/dll/flat.cpp index d7da4ca..035beb6 100644 --- a/dll/flat.cpp +++ b/dll/flat.cpp @@ -5843,14 +5843,9 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation( IStea return self->GetServerReputation(); } -STEAMAPI_API uint32 SteamAPI_ISteamGameServer_GetPublicIP( intptr_t instancePtr, void *instancePtr_possible ) -{ - //TODO: check if this actually works (ret value changed from uint32 to struct) - if (steamclient_has_ipv6_functions()) { - return ((ISteamGameServer012 *)instancePtr_possible)->GetPublicIP_old(); - } else { - return ((ISteamGameServer012 *)instancePtr)->GetPublicIP_old(); - } +STEAMAPI_API SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP( ISteamGameServer* self ) +{ + return self->GetPublicIP(); } STEAMAPI_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket( ISteamGameServer* self, const void * pData, int cbData, uint32 srcIP, uint16 srcPort ) diff --git a/sdk_includes/isteamgameserver012.h b/sdk_includes/isteamgameserver012.h index 26f7385..e61bf8d 100644 --- a/sdk_includes/isteamgameserver012.h +++ b/sdk_includes/isteamgameserver012.h @@ -189,6 +189,8 @@ public: // behind NAT and you want to advertise its IP in a lobby for other clients to directly // connect to virtual uint32 GetPublicIP_old() = 0; + + virtual SteamIPAddress_t GetPublicIP() = 0; // 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 diff --git a/sdk_includes/steam_api_flat.h b/sdk_includes/steam_api_flat.h index 2bd1953..7a25a35 100644 --- a/sdk_includes/steam_api_flat.h +++ b/sdk_includes/steam_api_flat.h @@ -1011,7 +1011,7 @@ STEAMAPI_API EUserHasLicenseForAppResult SteamAPI_ISteamGameServer_UserHasLicens STEAMAPI_API bool SteamAPI_ISteamGameServer_RequestUserGroupStatus( ISteamGameServer* self, uint64_steamid steamIDUser, uint64_steamid steamIDGroup ); STEAMAPI_API void SteamAPI_ISteamGameServer_GetGameplayStats( ISteamGameServer* self ); STEAMAPI_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation( ISteamGameServer* self ); -//STEAMAPI_API SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP( ISteamGameServer* self ); +STEAMAPI_API SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP( ISteamGameServer* self ); STEAMAPI_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket( ISteamGameServer* self, const void * pData, int cbData, uint32 srcIP, uint16 srcPort ); STEAMAPI_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket( ISteamGameServer* self, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort ); STEAMAPI_API void SteamAPI_ISteamGameServer_EnableHeartbeats( ISteamGameServer* self, bool bActive );