Changeset 5889 for code/branches/core5/src/modules/pong/PongBall.cc
- Timestamp:
- Oct 6, 2009, 4:57:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/modules/pong/PongBall.cc
r5885 r5889 102 102 { 103 103 velocity.z = -velocity.z; 104 if (GameMode::playsSound())105 this->sidesound_->play();106 107 104 if (position.z > this->fieldHeight_ / 2) 108 105 position.z = this->fieldHeight_ / 2; 109 106 if (position.z < -this->fieldHeight_ / 2) 110 107 position.z = -this->fieldHeight_ / 2; 108 109 this->fireEvent(); 110 if (GameMode::playsSound()) 111 this->sidesound_->play(); 111 112 } 112 113 … … 125 126 velocity.x = -velocity.x; 126 127 velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_; 128 129 this->fireEvent(); 127 130 if (GameMode::playsSound()) 128 131 this->batsound_->play(); … … 147 150 velocity.x = -velocity.x; 148 151 velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_; 152 153 this->fireEvent(); 149 154 if (GameMode::playsSound()) 150 155 this->batsound_->play();
Note: See TracChangeset
for help on using the changeset viewer.