Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 24, 2008, 2:48:43 AM (16 years ago)
Author:
landauf
Message:

many changes, can't remember everything, but these are the most important:

  • attaching entities to other entities works
  • displaying models, lights and shadows works
  • controlling a spectator works
  • removed an update hack in PositionableEntity because I've found a much better solution

and with "works" I mean: it works on client, server and standalone

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.h

    r1940 r2006  
    3737
    3838#include "objects/gametypes/Gametype.h"
     39#include "network/ClientConnectionListener.h"
    3940
    4041namespace orxonox
    4142{
    42     class _OrxonoxExport LevelInfo : public Info
     43    class _OrxonoxExport LevelInfo : public Info, public network::ClientConnectionListener
    4344    {
    4445        public:
     
    4849            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4950            void registerVariables();
     51
     52            inline const std::map<unsigned int, PlayerInfo*>& getClients() const
     53                { return this->clients_; }
    5054
    5155            inline void setDescription(const std::string& description)
     
    6266                { return this->ambientLight_; }
    6367
    64             void setGametype(const std::string& gametype);
    65             inline const std::string& getGametype() const
     68            void setGametypeString(const std::string& gametype);
     69            inline const std::string& getGametypeString() const
    6670                { return this->gametype_; }
     71            inline Gametype* getGametype() const
     72                { return this->rootGametype_; }
     73
     74            static LevelInfo* getActiveLevelInfo();
     75            static void listPlayers();
     76            static PlayerInfo* getClient(unsigned int clientID);
    6777
    6878        private:
     79            virtual void clientConnected(unsigned int clientID);
     80            virtual void clientDisconnected(unsigned int clientID);
     81
     82            void applyLevel();
     83
    6984            void applySkybox()
    7085                { this->setSkybox(this->skybox_); }
     
    7287                { this->setAmbientLight(this->ambientLight_); }
    7388
     89            std::map<unsigned int, PlayerInfo*> clients_;
    7490            std::string description_;
    7591            std::string skybox_;
     
    7793            std::string gametype_;
    7894            SubclassIdentifier<Gametype> gametypeIdentifier_;
    79             Gametype* gametypeInstance_;
     95            Gametype* rootGametype_;
     96            std::string levelfile_;
    8097    };
    8198}
Note: See TracChangeset for help on using the changeset viewer.