Changeset 2885 for code/trunk/src/orxonox/objects/worldentities
- Timestamp:
- Apr 1, 2009, 12:37:16 AM (16 years ago)
- Location:
- code/trunk/src/orxonox/objects/worldentities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/worldentities/PongBall.cc
r2839 r2885 37 37 { 38 38 CreateFactory(PongBall); 39 40 const float PongBall::MAX_REL_Z_VELOCITY = 1.5; 39 41 40 42 PongBall::PongBall(BaseObject* creator) : MovableEntity(creator) … … 79 81 position.x = this->fieldWidth_ / 2; 80 82 velocity.x = -velocity.x; 81 velocity.z = distance * distance * sgn(distance) * 1.5* this->speed_;83 velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_; 82 84 } 83 85 else if (position.x > this->fieldWidth_ / 2 * (1 + this->relMercyOffset_)) … … 97 99 position.x = -this->fieldWidth_ / 2; 98 100 velocity.x = -velocity.x; 99 velocity.z = distance * distance * sgn(distance) * 1.5* this->speed_;101 velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_; 100 102 } 101 103 else if (position.x < -this->fieldWidth_ / 2 * (1 + this->relMercyOffset_)) -
code/trunk/src/orxonox/objects/worldentities/PongBall.h
r2839 r2885 63 63 { this->bat_ = bats; } 64 64 65 static const float MAX_REL_Z_VELOCITY; 66 65 67 private: 66 68 float fieldWidth_;
Note: See TracChangeset
for help on using the changeset viewer.