diff --git a/src/NetworkSyncManager.cpp b/src/NetworkSyncManager.cpp index fd793a3f1e..229d86a0a3 100644 --- a/src/NetworkSyncManager.cpp +++ b/src/NetworkSyncManager.cpp @@ -367,9 +367,6 @@ void ETTProtocol::Update(NetworkSyncManager* n, float fDeltaTime) } } } - break; - case ettps_startselection: - break; case ettps_newroom: try { @@ -400,11 +397,11 @@ void ETTProtocol::Update(NetworkSyncManager* n, float fDeltaTime) auto updated = jsonToRoom((*it)["room"]); auto roomIt = find_if(n->m_Rooms.begin(), n->m_Rooms.end(), [&](RoomData const & room) { - return room.Name() == updated.Name + return room.Name() == updated.Name(); } ); if(roomIt != n->m_Rooms.end()) { - roomIt->SetDesc(updated.Desc()); + roomIt->SetDescription(updated.Description()); roomIt->SetState(updated.State()); roomIt->players = updated.players; SCREENMAN->SendMessageToTopScreen(ETTP_RoomsChange); diff --git a/src/RoomWheel.h b/src/RoomWheel.h index 419056ed92..2162bebd3e 100644 --- a/src/RoomWheel.h +++ b/src/RoomWheel.h @@ -13,10 +13,10 @@ class RoomData { void SetDescription(const std::string& desc) { m_description = desc; } void SetState(unsigned int state) { m_state = state; } void SetFlags(unsigned int iFlags) { m_iFlags = iFlags; } - inline std::string Name() { return m_name; } - inline std::string Description() { return m_description; } - inline unsigned int State() { return m_state; } - inline unsigned int GetFlags() { return m_iFlags; } + inline std::string Name() const { return m_name; } + inline std::string Description() const { return m_description; } + inline unsigned int State() const { return m_state; } + inline unsigned int GetFlags() const { return m_iFlags; } RoomData() { m_name=""; m_description=""; m_state=0; m_iFlags=0; } vector players; private: