diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-18 00:26:09 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-18 00:26:09 +0200 |
commit | 198632673196c87c5ba549721300d2e2b452f28b (patch) | |
tree | a5cbc09d84cdaaf32a04699de0e94c8c28effb4e /src/server.h | |
parent | a35d8dabcf5cdb5677849b84b4fbfb09a6fafad5 (diff) | |
download | dragonfireclient-198632673196c87c5ba549721300d2e2b452f28b.tar.xz |
fixed erroneus handling of many players with no peer existing at same time
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/server.h b/src/server.h index 4bdaa8455..9c655b9ab 100644 --- a/src/server.h +++ b/src/server.h @@ -437,11 +437,14 @@ private: // When called, connection mutex should be locked RemoteClient* getClient(u16 peer_id); - // Gets a player from memory or creates one. - // Caller should check isClientConnected() and set it appropriately. - // - // Call with env and con locked. - Player *emergePlayer(const char *name, const char *password); + /* + Get a player from memory or creates one. + If player is already connected, return NULL + + Call with env and con locked. + */ + Player *emergePlayer(const char *name, const char *password, + u16 peer_id); /* Update water pressure. |