Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 3, 2011, 5:42:19 PM (13 years ago)
Author:
dafrick
Message:

Cleaning up in SpaceShip and Engine. Fixed several bugs.
Kicked localLinearAcceleration, primaryThrust and auxiliaryThrust out of the SpaceShip, since it wasn't used anymore.
Moved the trail lights back a bit.
Added some documentation to SpaceShip and Engine.
SpeedPickup is working again, will need some further tuning.

Location:
code/trunk/src/orxonox/gametypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gametypes/Dynamicmatch.cc

    r8706 r8727  
    151151                //Give new pig boost
    152152                SpaceShip* spaceship = dynamic_cast<SpaceShip*>(victim);
    153                 grantPigBoost(spaceship);
     153                this->grantPigBoost(spaceship);
    154154            }
    155155
     
    245245                //Give new pig boost
    246246                SpaceShip* spaceship = dynamic_cast<SpaceShip*>(victim);
    247                 grantPigBoost(spaceship);
     247                this->grantPigBoost(spaceship);
    248248            }
    249249            // killer vs piggy
     
    306306    }
    307307
    308     void Dynamicmatch::grantPigBoost(orxonox::SpaceShip* spaceship)
     308    /**
     309    @brief
     310        Grant the piggy a boost.
     311    @param spaceship
     312        The SpaceShip to give the boost.
     313    */
     314    void Dynamicmatch::grantPigBoost(SpaceShip* spaceship)
    309315    {
    310316        // Give pig boost
    311317        if (spaceship)
    312318        {
    313             spaceship->setSpeedFactor(5);
     319            spaceship->addSpeedFactor(5);
    314320            WeakPtr<SpaceShip>* ptr = new WeakPtr<SpaceShip>(spaceship);
    315321            ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
     
    599605        if (*ptr)
    600606        {
    601             (*ptr)->setSpeedFactor(1.0f);
     607            (*ptr)->addSpeedFactor(1.0f/5.0f);
    602608        }
    603609        delete ptr;
  • code/trunk/src/orxonox/gametypes/Dynamicmatch.h

    r8706 r8727  
    3030#define _Dynamicmatch_H__
    3131
     32#include "OrxonoxPrereqs.h"
     33
    3234#include <map>
    3335#include <vector>
    34 #include "OrxonoxPrereqs.h"
     36
     37#include "tools/Timer.h"
     38
    3539#include "Gametype.h"
    36 #include "tools/Timer.h"
    3740
    3841namespace orxonox
     
    7376            virtual void furtherInstructions();*/
    7477            virtual void rewardPig();
    75             void grantPigBoost(SpaceShip* spaceship); // Added this, since it's used twice on different occasions.
     78            void grantPigBoost(SpaceShip* spaceship); // Grant the piggy a boost.
    7679            void resetSpeedFactor(WeakPtr<SpaceShip>* ptr);
    7780            void tick (float dt);// used to end the game
Note: See TracChangeset for help on using the changeset viewer.