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/weapons/projectiles
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/weapons/projectiles/LightningGunProjectile.cc

    r5929 r6387  
    4343        this->maxTextureIndex_ = 8;
    4444        this->textureTimer_.setTimer(0.01f, true, createExecutor(createFunctor(&LightningGunProjectile::changeTexture, this)));
    45        
     45
    4646        registerVariables();
    4747    }
    48    
     48
    4949    void LightningGunProjectile::registerVariables()
    5050    {
    5151        registerVariable(this->materialBase_);
    5252    }
    53    
     53
    5454    void LightningGunProjectile::setMaterial(const std::string& material)
    5555    {
    5656        this->materialBase_ = material;   
    57    
     57
    5858        BillboardProjectile::setMaterial(material + multi_cast<std::string>(this->textureIndex_));
    5959    }
     
    6464        if (this->textureIndex_ > this->maxTextureIndex_)
    6565            this->textureIndex_ = 1;
    66        
     66
    6767        this->setMaterial(this->materialBase_);
    6868    }
  • code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc

    r6383 r6387  
    5858        this->bDestroy_ = false;
    5959        this->lifetime_ = 100;
    60        
     60
    6161        if (GameMode::isMaster())
    6262        {
    6363            this->setCollisionType(WorldEntity::Kinematic);
    6464            this->setVelocity(0,0,-100);
    65        
     65
    6666            Model* model = new Model(this);
    6767            model->setMeshSource("rocket.mesh");
     
    7272            fire->setOrientation(this->getOrientation());
    7373            fire->setSource("Orxonox/rocketfire");
    74        
     74
    7575            this->enableCollisionCallback();
    7676            this->setCollisionResponse(false);
     
    8383
    8484            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&Rocket::destroyObject, this)));
    85            
     85
    8686            this->defSndWpnEngine_ = new WorldSound(this);
    8787            this->defSndWpnEngine_->setLooping(true);
     
    9999            this->defSndWpnLaunch_ = 0;
    100100        }
    101        
     101
    102102        CameraPosition* camPosition = new CameraPosition(this);
    103103        camPosition->setPosition(0,4,15);
     
    134134        SUPER(Rocket, XMLPort, xmlelement, mode);
    135135    }
    136    
     136
    137137    void Rocket::setOwner(Pawn* owner)
    138138    {
     
    158158    {
    159159        SUPER(Rocket, tick, dt);
    160        
     160
    161161        if( this->hasLocalController() )
    162162        {
     
    164164            this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
    165165            this->localAngularVelocity_ = 0;
    166            
     166
    167167            if( this->bDestroy_ )
    168168                this->destroy();
    169169        }
    170170    }
    171    
     171
    172172    bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    173173    {
     
    176176            if (otherObject == this->owner_)
    177177                return false;
    178            
     178
    179179            this->bDestroy_ = true;
    180180
     
    211211        return false;
    212212    }
    213    
     213
    214214    void Rocket::destroyObject()
    215215    {
     
    223223        }
    224224    }
    225    
     225
    226226    void Rocket::fired(unsigned int firemode)
    227227    {
     
    258258    {
    259259        ControllableEntity::rotateYaw(value);
    260        
     260
    261261        if( !this->isInMouseLook() )
    262262            this->localAngularVelocity_.y += value.x;
     
    272272    {
    273273        ControllableEntity::rotatePitch(value);
    274        
     274
    275275        if( !this->isInMouseLook() )
    276276            this->localAngularVelocity_.x += value.x;
     
    286286    {
    287287        ControllableEntity::rotateRoll(value);
    288        
     288
    289289        if( !this->isInMouseLook() )
    290290            this->localAngularVelocity_.z += value.x;
    291291    }
    292    
     292
    293293}
  • code/branches/presentation2/src/modules/weapons/projectiles/Rocket.h

    r6378 r6387  
    5454            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Rocket through XML.
    5555            virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick.
    56            
     56
    5757            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    5858            void destroyObject();
    59            
     59
    6060            virtual void moveFrontBack(const Vector2& value){}
    6161            virtual void moveRightLeft(const Vector2& value){}
     
    6565            virtual void rotatePitch(const Vector2& value);
    6666            virtual void rotateRoll(const Vector2& value);
    67            
     67
    6868            /**
    6969            @brief Moves the Rocket in the Front/Back-direction by the specifed amount.
     
    8484            inline void moveUpDown(float value)
    8585            { this->moveUpDown(Vector2(value, 0)); }
    86            
     86
    8787            /**
    8888            @brief Rotates the Rocket around the y-axis by the specifed amount.
     
    103103            inline void rotateRoll(float value)
    104104            { this->rotateRoll(Vector2(value, 0)); }
    105            
     105
    106106            void setOwner(Pawn* owner);
    107107            inline Pawn* getOwner() const
    108108                { return this->owner_; }
    109                
     109
    110110            inline void setDamage(float damage)
    111111                { this->damage_ = damage; }
     
    113113                { return this->damage_; }
    114114            virtual void fired(unsigned int firemode);
    115            
     115
    116116        private:
    117117            WeakPtr<Pawn> owner_;
     
    120120            bool bDestroy_;
    121121            ControllableEntity* originalControllableEntity_;
    122            
     122
    123123            WeakPtr<PlayerInfo> player_;
    124124            Timer destroyTimer_;
Note: See TracChangeset for help on using the changeset viewer.