BUGFIX: Solved server failure
Cause: server/server_application.cpp: line 93 The last argument to std::pair was simply a call to WorldRoom's contructor. This created a temporary object that fufilled this line, but after the new std::pair object was added to worldRoomMap, this WorldRoom object went out of scope. server/server_application.cpp: line 96 When OpenRoom() was called using an object that was out of scope, the entire server simply failed. Solution: Changed worldRoomMap to hold a pointer to a WorldRoom object, rather than the object itself. The new and delete operators should be used to create and delete WorldRoom objects respectfully.
This commit is contained in:
@@ -82,7 +82,7 @@ private:
|
||||
//global lists
|
||||
ClientMap clientMap;
|
||||
PlayerMap playerMap;
|
||||
WorldRoomMap worldRoomMap;
|
||||
std::map<int, WorldRoom*> worldRoomMap;
|
||||
|
||||
int clientCounter = 0;
|
||||
int playerCounter = 0;
|
||||
|
||||
Reference in New Issue
Block a user