aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/environment.cpp3
-rw-r--r--src/environment.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index 17b98acd1..6d987e3c2 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -194,7 +194,8 @@ void Environment::addPlayer(Player *player)
#ifndef SERVER
assert(player->isLocal() == false || getLocalPlayer() == NULL);
#endif
- assert(getPlayer(player->peer_id) == NULL);
+ if(player->peer_id != 0)
+ assert(getPlayer(player->peer_id) == NULL);
m_players.push_back(player);
}
diff --git a/src/environment.h b/src/environment.h
index 03f366b47..fa7253170 100644
--- a/src/environment.h
+++ b/src/environment.h
@@ -73,6 +73,8 @@ public:
private:
Map *m_map;
+ // peer_ids in here should be unique, except that there may be
+ // many 0s
core::list<Player*> m_players;
// Debug output goes here
std::ostream &m_dout;