#include "stdafx.h" #include "PS3_PlayerUID.h" #include "..\Minecraft.World\StringHelpers.h" std::size_t PlayerUID::Hash::operator()(const PlayerUID& k) const { // now only hashing against the local ID, as this is now unique across the network too. std::size_t seed = 0; boost::hash_combine(seed, k.m_userID); for(int i=0; i(macDigit); } // parse the userID wstring userIDDigits = fromString.substr(15,8); m_userID = _fromString(userIDDigits); // finally, the onlineID, if there is one wstring onlineID = fromString.substr(24); if(onlineID.size() > 0) { wcstombs(m_onlineID, onlineID.c_str(), 16); m_bSignedIntoPSN = true; } else { m_onlineID[0] = 0; m_bSignedIntoPSN = false; } } bool PlayerUID::operator==(const PlayerUID& rhs) const { // comparing online IDs if(isSignedIntoPSN() && rhs.isSignedIntoPSN()) { return (strcmp(m_onlineID, rhs.m_onlineID) == 0); } // comparing offline IDs if(m_userID != rhs.m_userID) return false; for(int i=0; i