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:
@@ -60,6 +60,4 @@ private:
|
||||
PlayerMap playerMap;
|
||||
};
|
||||
|
||||
typedef std::map<int, WorldRoom> WorldRoomMap;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user