1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

OMG! Main Menu!

This commit is contained in:
Perttu Ahola 2011-01-23 17:29:15 +02:00
parent c0a1bcf473
commit c914cbb0a0
25 changed files with 897 additions and 272 deletions

View file

@ -190,9 +190,16 @@ Map & Environment::getMap()
void Environment::addPlayer(Player *player)
{
DSTACK(__FUNCTION_NAME);
//Check that only one local player exists and peer_ids are unique
/*
Check that only one local player exists and peer_ids are unique.
Exception: there can be multiple players with peer_id=0
*/
#ifndef SERVER
assert(player->isLocal() == false || getLocalPlayer() == NULL);
/*
It is a failure if player is local and there already is a local
player
*/
assert(!(player->isLocal() == true && getLocalPlayer() != NULL));
#endif
if(player->peer_id != 0)
assert(getPlayer(player->peer_id) == NULL);