Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2009, 12:37:19 PM (15 years ago)
Author:
decapitb
Message:

everything

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particles/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2826 r3054  
    3939#include "objects/worldentities/ParticleSpawner.h"
    4040#include "objects/worldentities/ExplosionChunk.h"
     41#include "objects/worldentities/BigExplosion.h"
    4142
    4243namespace orxonox
     
    129130        this->firehack_ = 0x0;
    130131
    131         if (this->health_ <= 0)
     132        if (this->health_ <= 0 && bAlive_){
    132133            this->death();
     134        }
    133135    }
    134136
     
    212214
    213215            if (Core::isMaster())
    214                 this->deatheffect();
     216            // this->deathEffect();
     217                this->goWithStyle();
    215218        }
    216219        else
    217220            this->setHealth(1);
    218221    }
    219 
     222    void Pawn::goWithStyle()
     223    {
     224        this->bAlive_ = false;
     225        this->setDestroyWhenPlayerLeft(false);
     226
     227        BigExplosion* chunk = new BigExplosion(this->getCreator());
     228        chunk->setPosition(this->getPosition());
     229
     230    }
    220231    void Pawn::deatheffect()
    221232    {
Note: See TracChangeset for help on using the changeset viewer.