Changeset 8952 for code/trunk/src/modules/pong
- Timestamp:
- Nov 26, 2011, 6:22:13 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pong/PongAI.cc
r8729 r8952 164 164 if (!this->bChangedRandomOffset_) 165 165 { 166 float timetohit = (- this->ball_->getPosition().x + this->ball_->getFieldDimension().x / 2 * sgn(this->ball_->getVelocity().x)) / this->ball_->getVelocity().x;166 float timetohit = (-ballpos.x + this->ball_->getFieldDimension().x / 2 * sgn(ballvel.x)) / ballvel.x; 167 167 if (timetohit < 0.05) 168 168 {
Note: See TracChangeset
for help on using the changeset viewer.