- Timestamp:
- Dec 10, 2008, 8:24:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickups2/src/orxonox/objects/pickup/Turbo.cc
r2389 r2397 43 43 { 44 44 SpaceShip* ship = dynamic_cast <SpaceShip*>(player); 45 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;46 45 if(duration_==0 ) 47 { if(addTo(player)) 48 { 46 { 47 if(addTo(player)) 48 { 49 49 COUT(3)<<"ITEM EQUIPPED"<<std::endl; 50 50 this->setSpeedBoost(ship); 51 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;52 51 return true; 53 } 52 } 53 return false; 54 54 } 55 55 else 56 56 { 57 57 this->setSpeedBoost(ship); 58 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl;59 58 return true; 60 59 } … … 73 72 ship->setRotAcc( ship->getRotAcc()-this->rotacc_); 74 73 COUT(3)<<"BOOST UNSET"<<std::endl; 74 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl; 75 75 } 76 76 77 77 void Turbo::setSpeedBoost(SpaceShip* ship) 78 78 { 79 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl; 79 80 ship->setMaxSpeed( ship->getMaxSpeed() + this->boost_); 80 81 ship->setTransAcc( ship->getTransAcc()*this->accboost_); … … 87 88 turbotimer_.setTimer(this->duration_, false, this, executor); 88 89 } 89 90 COUT(3)<<"Speed:"<< ship->getMaxSpeed()<<std::endl; 90 91 } 91 92 bool Turbo::dropped(Pawn* player)
Note: See TracChangeset
for help on using the changeset viewer.