Changeset 11083 for code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
- Timestamp:
- Jan 21, 2016, 1:59:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.