Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2009, 1:18:36 PM (15 years ago)
Author:
rgrieder
Message:

Found some non empty new lines.

Location:
code/branches/presentation2/src/modules/pong
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/pong/Pong.cc

    r5929 r6387  
    4242    CreateEventName(PongCenterpoint, right);
    4343    CreateEventName(PongCenterpoint, left);
    44    
     44
    4545    CreateUnloadableFactory(Pong);
    4646
     
    164164            else if (player == this->getLeftPlayer())
    165165                this->center_->fireEvent(FireEventName(PongCenterpoint, left));
    166            
     166
    167167            if (player)
    168168                this->gtinfo_->sendAnnounceMessage(player->getName() + " scored");
  • code/branches/presentation2/src/modules/pong/PongAI.cc

    r5929 r6387  
    131131                this->bOscillationAvoidanceActive_ = false;
    132132            }
    133            
     133
    134134            // If the ball is close enough, calculate another random offset to accelerate the ball
    135135            if (!this->bChangedRandomOffset_)
     
    206206            // calculate the time until the ball reaches the other side
    207207            float totaltime = (-position.x + dimension.x / 2 * sgn(velocity.x)) / velocity.x;
    208            
     208
    209209            // calculate wall bounce position (four possible solutions of the equation: pos.z + vel.z*t + acc.z/2*t^2 = +/- dim.z/2)
    210210            float bouncetime = totaltime;
    211211            bool bUpperWall = false;
    212            
     212
    213213            if (acceleration.z == 0)
    214214            {
     
    270270                // ball bounces after <bouncetime> seconds, update the position and continue
    271271                velocity.z = velocity.z + acceleration.z * bouncetime;
    272                
     272
    273273                if (bUpperWall)
    274274                {
     
    281281                    velocity.z = fabs(velocity.z) - fabs(randomErrorZ);
    282282                }
    283                    
     283
    284284                position.x = position.x + velocity.x * bouncetime + randomErrorX;
    285285                this->ballEndPosition_ = position.z;
  • code/branches/presentation2/src/modules/pong/PongBall.cc

    r5929 r6387  
    105105                        velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_;
    106106                        acceleration = this->bat_[1]->getVelocity() * this->accelerationFactor_ * -1;
    107                        
     107
    108108                        this->fireEvent();
    109109                    }
Note: See TracChangeset for help on using the changeset viewer.