mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 03:23:45 +01:00
fixed erroneus handling of many players with no peer existing at same time
This commit is contained in:
parent
1986326731
commit
b6787a2b58
@ -194,7 +194,8 @@ void Environment::addPlayer(Player *player)
|
|||||||
#ifndef SERVER
|
#ifndef SERVER
|
||||||
assert(player->isLocal() == false || getLocalPlayer() == NULL);
|
assert(player->isLocal() == false || getLocalPlayer() == NULL);
|
||||||
#endif
|
#endif
|
||||||
assert(getPlayer(player->peer_id) == NULL);
|
if(player->peer_id != 0)
|
||||||
|
assert(getPlayer(player->peer_id) == NULL);
|
||||||
m_players.push_back(player);
|
m_players.push_back(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Map *m_map;
|
Map *m_map;
|
||||||
|
// peer_ids in here should be unique, except that there may be
|
||||||
|
// many 0s
|
||||||
core::list<Player*> m_players;
|
core::list<Player*> m_players;
|
||||||
// Debug output goes here
|
// Debug output goes here
|
||||||
std::ostream &m_dout;
|
std::ostream &m_dout;
|
||||||
|
Loading…
Reference in New Issue
Block a user