Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2008, 2:16:49 AM (16 years ago)
Author:
landauf
Message:
  • Added Bot (the artifical counterpart to HumanPlayer)
  • Added ArtificialController, the baseclass of all non-human-controllers
  • Added AIController, a simple reimplementation of the old AISpaceShip (but of course without the SpaceShip, just the AI)
  • Added currently empty class ScriptController
  • Some tweaks in PlayerInfo, ControllableEntity and Controller
  • Made Spacetator speed configurable

I don't know where, but there's still an issue in the new code, maybe even caused by the previous commit. The Server seems to crash when a Client disconnects, but only if the Server runs within the debugger.

Location:
code/branches/objecthierarchy2/src/orxonox/objects/infos
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/infos/CMakeLists.txt

    r2171 r2362  
    11SET( SRC_FILES
     2  Bot.cc
    23  Info.cc
    34  PlayerInfo.cc
  • code/branches/objecthierarchy2/src/orxonox/objects/infos/HumanPlayer.h

    r2171 r2362  
    3333
    3434#include "PlayerInfo.h"
    35 #include "core/Identifier.h"
    36 #include "objects/controllers/Controller.h"
    3735
    3836namespace orxonox
  • code/branches/objecthierarchy2/src/orxonox/objects/infos/PlayerInfo.cc

    r2171 r2362  
    4646        this->bLocalPlayer_ = false;
    4747        this->bReadyToSpawn_ = false;
     48        this->bSetUnreadyAfterSpawn_ = true;
    4849        this->controller_ = 0;
    4950        this->controllableEntity_ = 0;
     
    122123            this->controllableEntityID_ = entity->getObjectID();
    123124            entity->setPlayer(this);
    124             this->bReadyToSpawn_ = false;
     125            this->bReadyToSpawn_ &= (!this->bSetUnreadyAfterSpawn_);
    125126        }
    126127        else
  • code/branches/objecthierarchy2/src/orxonox/objects/infos/PlayerInfo.h

    r2171 r2362  
    7373        protected:
    7474            void createController();
    75             void networkcallback_changedcontrollableentityID();
    7675
    7776            bool bHumanPlayer_;
    7877            bool bLocalPlayer_;
     78            bool bSetUnreadyAfterSpawn_;
     79            SubclassIdentifier<Controller> defaultController_;
     80            unsigned int clientID_;
     81
     82        private:
     83            void networkcallback_changedcontrollableentityID();
     84
    7985            bool bReadyToSpawn_;
    80             SubclassIdentifier<Controller> defaultController_;
    8186            Controller* controller_;
    8287            ControllableEntity* controllableEntity_;
    8388            unsigned int controllableEntityID_;
    84             unsigned int clientID_;
    8589    };
    8690}
Note: See TracChangeset for help on using the changeset viewer.