Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 26, 2008, 7:48:26 PM (15 years ago)
Author:
dsommer
Message:

Added ShipEquipment to Pawn and various funtions for it -not compiling, because private…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickups2/src/orxonox/objects/pickup/Turbo.cc

    r2227 r2289  
    1919                this->duration_ = 0;
    2020                this->accboost_ = 1;
     21                this->rotacc_= 0;
    2122        }
    2223
     
    3233        XMLPortParam(Turbo, "duration", setDuration, getDuration, xmlelement, mode);
    3334        XMLPortParam(Turbo, "accboost", setAccBoost, getAccBoost, xmlelement, mode);
     35        XMLPortParam(Turbo, "rotacc", setRotAcc, getRotAcc, xmlelement, mode);
     36       
    3437    }
    3538
     
    5356        ship->setMaxSpeed( ship->getMaxSpeed() - this->boost_);
    5457        ship->setTransAcc( ship->getTransAcc()/this->accboost_);
     58        ship->setMaxRotation( ship->getMaxRotation()-this->rotacc_);
     59        ship->setRotAcc( ship->getRotAcc()-this->rotacc_);
    5560        COUT(3)<<"PickUp Timer expired"<<std::endl;
    5661        }
     
    6065        ship->setMaxSpeed( ship->getMaxSpeed() + this->boost_);
    6166        ship->setTransAcc( ship->getTransAcc()*this->accboost_);
     67        ship->setMaxRotation( ship->getMaxRotation()+this->rotacc_);
     68        ship->setRotAcc( ship->getRotAcc()+this->rotacc_);
    6269        if( this->duration_ != 0)
    6370        {
     
    7279                if (this->duration_ == 0)
    7380                {
    74                         //player->Equipment.erase ( std::pair<std::string, Item*>(this->itemname,this) );
     81                        if(remove(player)==true);
     82                        {
    7583                        SpaceShip* ship = dynamic_cast <SpaceShip*>(player);
    7684                        this->unsetSpeedBoost(ship);
     85                        }       
    7786                }
    7887                return true;
Note: See TracChangeset for help on using the changeset viewer.