Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 9, 2008, 7:11:53 PM (16 years ago)
Author:
landauf
Message:

Split up LevelManager into LevelManager and PlayerManager where LevelManager handles all levels and is only active on the server, while PlayerManager handles client connections and passes new players to the LevelManager (if running on a server). If running on a client, PlayerManager just maps PlayerInfos with clientIDs.

Also added a small hack in Level.cc to show the ChatOverlay on clients.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/infos/Level.cc

    r2112 r2168  
    4040#include "PlayerInfo.h"
    4141#include "objects/gametypes/Gametype.h"
     42#include "overlays/OverlayGroup.h"
    4243
    4344#include "util/Math.h"
     
    6263        if (this->isInitialized())
    6364        {
    64             LevelManager::getInstance().releaseActivity(this);
     65            if (LevelManager::getInstancePtr())
     66                LevelManager::getInstance().releaseActivity(this);
    6567
    6668            if (this->xmlfile_)
     
    9395        mask.exclude(Class(BaseObject));
    9496        mask.include(Class(Template));
     97        mask.include(Class(OverlayGroup)); // HACK to include the ChatOverlay
    9598
    9699        this->xmlfile_ = new XMLFile(Settings::getDataPath() + this->xmlfilename_, mask);
     
    112115                (*it)->setGametype(rootgametype);
    113116
    114             LevelManager::getInstance().requestActivity(this);
     117            if (LevelManager::getInstancePtr())
     118                LevelManager::getInstance().requestActivity(this);
    115119        }
    116120    }
Note: See TracChangeset for help on using the changeset viewer.