From 8e5c5020ea99f6877e2cd66183db1520405406a2 Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 15 Oct 2023 11:17:50 -0300 Subject: [PATCH] Fix get_steam64_from_peer_id get -1 ever --- steam-multiplayer-peer/steam_multiplayer_peer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steam-multiplayer-peer/steam_multiplayer_peer.cpp b/steam-multiplayer-peer/steam_multiplayer_peer.cpp index b0eb772..4f6b782 100644 --- a/steam-multiplayer-peer/steam_multiplayer_peer.cpp +++ b/steam-multiplayer-peer/steam_multiplayer_peer.cpp @@ -471,7 +471,7 @@ void SteamMultiplayerPeer::_process_ping(const SteamNetworkingMessage_t *msg) { uint64_t SteamMultiplayerPeer::get_steam64_from_peer_id(const uint32_t peer_id) const { if (peer_id == this->unique_id) { return SteamUser()->GetSteamID().ConvertToUint64(); - } else if (peerId_to_steamId.find(peer_id) == peerId_to_steamId.end()) { + } else if (peerId_to_steamId.has(peer_id)) { return peerId_to_steamId[peer_id]->steam_id; } else return -1;