Changeset 11083 for code/trunk/src/orxonox/worldentities/pawns
- Timestamp:
- Jan 21, 2016, 1:59:04 PM (9 years ago)
- Location:
- code/trunk/src/orxonox/worldentities/pawns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h
r11071 r11083 46 46 virtual ~FpsPlayer(); 47 47 48 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;49 virtual void tick(float dt) ;48 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 49 virtual void tick(float dt) override; 50 50 void registerVariables(); 51 51 void setConfigValues(); 52 52 53 virtual void moveFrontBack(const Vector2& value) ;54 virtual void moveRightLeft(const Vector2& value) ;55 virtual void moveUpDown(const Vector2& value) ;53 virtual void moveFrontBack(const Vector2& value) override; 54 virtual void moveRightLeft(const Vector2& value) override; 55 virtual void moveUpDown(const Vector2& value) override; 56 56 57 virtual void rotateYaw(const Vector2& value) ;58 virtual void rotatePitch(const Vector2& value) ;59 virtual void rotateRoll(const Vector2& value) ;57 virtual void rotateYaw(const Vector2& value) override; 58 virtual void rotatePitch(const Vector2& value) override; 59 virtual void rotateRoll(const Vector2& value) override; 60 60 61 61 … … 65 65 { return this->meshSrc_; } 66 66 67 void boost(bool bBoost) ; //acctually jump67 void boost(bool bBoost) override; //actually jump 68 68 69 69 virtual void fire(); … … 71 71 virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; 72 72 73 virtual void addedWeaponPack(WeaponPack* wPack) ;73 virtual void addedWeaponPack(WeaponPack* wPack) override; 74 74 75 75 protected: 76 virtual void setPlayer(PlayerInfo* player) ;77 virtual void startLocalHumanControl() ;76 virtual void setPlayer(PlayerInfo* player) override; 77 virtual void startLocalHumanControl() override; 78 78 bool bInvertYAxis_; 79 79 … … 89 89 90 90 private: 91 virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const ;91 virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const override; 92 92 float speed_; 93 93 -
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
r11071 r11083 235 235 236 236 // This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling. 237 if (this->getLocalVelocity().z < 0 && abs(this->getLocalVelocity().z) < stallSpeed_)238 this->moveRightLeft(-lift_ / 5.0f * value * sqrt( abs(this->getLocalVelocity().z)));237 if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_) 238 this->moveRightLeft(-lift_ / 5.0f * value * sqrt(std::abs(this->getLocalVelocity().z))); 239 239 } 240 240 … … 257 257 258 258 // This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling. 259 if (this->getLocalVelocity().z < 0 && abs(this->getLocalVelocity().z) < stallSpeed_)260 this->moveUpDown(lift_ / 5.0f * pitch * sqrt( abs(this->getLocalVelocity().z)));259 if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_) 260 this->moveUpDown(lift_ / 5.0f * pitch * sqrt(std::abs(this->getLocalVelocity().z))); 261 261 } 262 262 … … 505 505 this->shakeDt_ += dt; 506 506 507 float frequency = this->shakeFrequency_ * (square( abs(this->getLocalVelocity().z)));507 float frequency = this->shakeFrequency_ * (square(std::abs(this->getLocalVelocity().z))); 508 508 509 509 if (this->shakeDt_ >= 1.0f/frequency)
Note: See TracChangeset
for help on using the changeset viewer.