Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2011, 3:54:40 PM (13 years ago)
Author:
simonmie
Message:

comments added, unused parts removed, some spam messages removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gameimmersion/src/modules/weapons/projectiles/Rocket.cc

    r8538 r8542  
    2323 *      Oliver Scheuss
    2424 *   Co-authors:
    25  *      ...
     25 *      simonmie
    2626 *
    2727 */
     
    4343#include "Scene.h"
    4444
    45 #include "BasicProjectile.h"
    46 
    4745namespace orxonox
    4846{
     
    5957
    6058        this->localAngularVelocity_ = 0;
    61 //        this->bDestroy_ = false;
    6259        this->lifetime_ = 100;
    6360
     
    183180    }
    184181
     182    /* Calls the collidesAgainst function of BasicProjectile
     183     */
    185184    bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    186185    {
    187186        return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this);
    188 
    189 /* * /        if (!this->bDestroy_ && GameMode::isMaster())
    190         {
    191             if (otherObject == this->owner_)
    192                 return false;
    193 
    194             this->bDestroy_ = true;
    195 
    196             if (this->owner_)
    197             {
    198                 {
    199                     ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
    200                     effect->setPosition(this->getPosition());
    201                     effect->setOrientation(this->getOrientation());
    202                     effect->setDestroyAfterLife(true);
    203                     effect->setSource("Orxonox/explosion4");
    204                     effect->setLifetime(2.0f);
    205                 }
    206 
    207                 {
    208                     ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
    209                     effect->setPosition(this->getPosition());
    210                     effect->setOrientation(this->getOrientation());
    211                     effect->setDestroyAfterLife(true);
    212                     effect->setSource("Orxonox/smoke4");
    213                     effect->setLifetime(3.0f);
    214                 }
    215             }
    216 
    217             Pawn* victim = orxonox_cast<Pawn*>(otherObject);
    218             if (victim)
    219                 victim->hit(this->owner_, contactPoint, this->damage_);
    220 //             this->destroy();
    221         }
    222 / * */        return false;
    223187    }
    224188
     
    237201    void Rocket::fired(unsigned int firemode)
    238202    {
    239 //         if (this->owner_)
    240 //         {
    241             this->destroy();
    242 //         }
     203        this->destroy();
    243204    }
    244205
Note: See TracChangeset for help on using the changeset viewer.