From 198632673196c87c5ba549721300d2e2b452f28b Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 18 Jan 2011 00:26:09 +0200 Subject: fixed erroneus handling of many players with no peer existing at same time --- src/server.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/server.h') 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. -- cgit v1.2.3