Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2008, 6:01:13 PM (17 years ago)
Author:
landauf
Message:

Merged objecthierarchy2 into presentation branch

Couln't merge 2 lines in Gamestate.cc and a whole block of code in GSDedicated.cc (it seems like oli implemented in both branches something like a network-tick-limiter but with different approaches)

Not yet tested in network mode and with bots
The SpaceShips movement is also not yet fully adopted to the new physics (see Engine class)

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.h

    r2459 r2485  
    4545            virtual void tick(float dt);
    4646            void registerVariables();
     47            void setConfigValues();
     48
     49            virtual void changedGametype();
    4750
    4851            virtual void setPlayer(PlayerInfo* player);
     
    6063            virtual void moveUpDown(const Vector2& value) {}
    6164
    62             virtual void rotateYaw(const Vector2& value) {}
    63             virtual void rotatePitch(const Vector2& value) {}
    64             virtual void rotateRoll(const Vector2& value) {}
     65            virtual void rotateYaw(const Vector2& value);
     66            virtual void rotatePitch(const Vector2& value);
     67            virtual void rotateRoll(const Vector2& value);
     68
     69            inline void moveFrontBack(float value)
     70                { this->moveFrontBack(Vector2(value, 0)); }
     71            inline void moveRightLeft(float value)
     72                { this->moveRightLeft(Vector2(value, 0)); }
     73            inline void moveUpDown(float value)
     74                { this->moveUpDown(Vector2(value, 0)); }
     75
     76            inline void rotateYaw(float value)
     77                { this->rotateYaw(Vector2(value, 0)); }
     78            inline void rotatePitch(float value)
     79                { this->rotatePitch(Vector2(value, 0)); }
     80            inline void rotateRoll(float value)
     81                { this->rotateRoll(Vector2(value, 0)); }
    6582
    6683            virtual void fire() {}
    6784            virtual void altFire() {}
    6885
     86            virtual void boost() {}
    6987            virtual void greet() {}
    7088            virtual void use() {}
    7189            virtual void switchCamera();
     90            virtual void mouseLook();
    7291
    7392            inline const std::string& getHudTemplate() const
     
    99118            void setAngularVelocity(const Vector3& velocity);
    100119
     120            inline bool hasLocalController() const
     121                { return this->bHasLocalController_; }
     122            inline bool hasHumanController() const
     123                { return this->bHasHumanController_; }
     124
     125            inline const GametypeInfo* getGametypeInfo() const
     126                { return this->gtinfo_; }
     127
     128            inline bool isInMouseLook() const
     129                { return this->bMouseLook_; }
     130            inline float getMouseLookSpeed() const
     131                { return this->mouseLookSpeed_; }
     132
    101133        protected:
    102             virtual void startLocalControl();
    103             virtual void stopLocalControl();
     134            virtual void startLocalHumanControl();
     135            virtual void stopLocalHumanControl();
    104136
    105137            inline void setHudTemplate(const std::string& name)
    106138                { this->hudtemplate_ = name; }
    107 
    108             inline bool isLocallyControlled() const
    109                 { return this->bControlled_; }
    110139
    111140        private:
     
    124153
    125154            void networkcallback_changedplayerID();
     155            void networkcallback_changedgtinfoID();
    126156
    127157            // Bullet btMotionState related
     
    131161            unsigned int client_overwrite_;
    132162
    133             bool bControlled_;
     163            bool bHasLocalController_;
     164            bool bHasHumanController_;
     165            bool bDestroyWhenPlayerLeft_;
     166
    134167            Vector3 server_position_;
    135168            Vector3 client_position_;
     
    143176            PlayerInfo* player_;
    144177            unsigned int playerID_;
     178
    145179            std::string hudtemplate_;
    146180            OverlayGroup* hud_;
     181
    147182            Camera* camera_;
    148             bool bDestroyWhenPlayerLeft_;
    149 
     183            bool bMouseLook_;
     184            float mouseLookSpeed_;
     185            Ogre::SceneNode* cameraPositionRootNode_;
    150186            std::list<CameraPosition*> cameraPositions_;
    151187            std::string cameraPositionTemplate_;
     188
     189            const GametypeInfo* gtinfo_;
     190            unsigned int gtinfoID_;
    152191    };
    153192}
Note: See TracChangeset for help on using the changeset viewer.