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/Projectile.cc

    r8538 r8542  
    2323 *      Fabian 'x3n' Landau
    2424 *   Co-authors:
    25  *      ...
     25 *      simonmie
    2626 *
    2727 */
     
    4646
    4747        this->setConfigValues();
    48 //        this->bDestroy_ = false;
    49 //        this->owner_ = 0;
    50 //        this->damage_ = 115;
    51 ///////////////////me
    52 //        this->healthdamage_ = 0;
    53 //        this->shielddamage_ = 0;
    54 ///////////////////end me
     48        this->owner_ = 0;
    5549
    5650        // Get notification about collisions
    57 
    5851        if (GameMode::isMaster())
    5952        {
     
    9891    }
    9992
     93    /* Calls the collidesAgainst function of BasicProjectile
     94     */
    10095    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    10196    {
     
    10398    }
    10499
    105 //////////////////////////me edit
    106 /*    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    107     {
    108         if (!this->bDestroy_ && GameMode::isMaster())
    109         {
    110             if (otherObject == this->owner_)
    111                 return false;
    112 
    113             this->bDestroy_ = true;
    114 
    115             Pawn* victim = orxonox_cast<Pawn*>(otherObject); //if otherObject isn't a Pawn, then victim is NULL
    116 
    117             if (this->owner_)
    118             {
    119                 if (!victim || (victim && !victim->hasShield())) //same like below
    120                 {
    121                     ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
    122                     effect->setPosition(this->getPosition());
    123                     effect->setOrientation(this->getOrientation());
    124                     effect->setDestroyAfterLife(true);
    125                     effect->setSource("Orxonox/explosion3");
    126                     effect->setLifetime(2.0f);
    127                 }
    128                 if (!victim || (victim && !victim->hasShield())) //same like above
    129                 {
    130                     ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
    131                     effect->setPosition(this->getPosition());
    132                     effect->setOrientation(this->getOrientation());
    133                     effect->setDestroyAfterLife(true);
    134                     effect->setSource("Orxonox/smoke4");
    135                     effect->setLifetime(3.0f);
    136                 }
    137                 if (victim && victim->hasShield())
    138                 {
    139                     ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
    140                     effect->setPosition(this->getPosition());
    141                     effect->setOrientation(this->getOrientation());
    142                     effect->setDestroyAfterLife(true);
    143                     effect->setSource("Orxonox/engineglow");
    144                     effect->setLifetime(0.5f);
    145                 }
    146             }
    147 
    148             if (victim)
    149             {
    150                 victim->hit(this->owner_, contactPoint, this->damage_, this->healthdamage_, this->shielddamage_);
    151                 victim->startReloadCountdown();
    152             }
    153         }
    154         return false;
    155     }
    156 //////////////////////////////////////////////////////////////////////end edit
    157 */
    158100    void Projectile::setOwner(Pawn* owner)
    159101    {
Note: See TracChangeset for help on using the changeset viewer.