Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2009, 2:45:54 PM (16 years ago)
Author:
landauf
Message:

merged particles branch back to trunk

Location:
code/trunk
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/OrxonoxPrereqs.h

    r3084 r3087  
    124124    class Billboard;
    125125    class BlinkingBillboard;
     126    class BigExplosion;
    126127    class ExplosionChunk;
    127128    class FadingBillboard;
  • code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc

    • Property svn:eol-style set to native
    r3086 r3087  
    3636#include <sstream>
    3737
    38 #include "core/Core.h"
     38#include "core/GameMode.h"
    3939#include "core/CoreIncludes.h"
    4040#include "core/Executor.h"
     
    5353        RegisterObject(BigExplosion);
    5454
    55         if ( Core::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
     55        if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
    5656            ThrowException(AbortLoading, "Can't create BigExplosion, no scene or no scene manager given.");
    5757/*
     
    7070*/
    7171
    72         if ( Core::showsGraphics() )
     72        if ( GameMode::showsGraphics() )
    7373        {
    7474            try
     
    8787        }
    8888
    89         if (Core::isMaster())
     89        if (GameMode::isMaster())
    9090        {
    9191            Vector3 velocity(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1));
     
    9494            this->setVelocity(velocity);
    9595
    96             this->destroyTimer_.setTimer(rnd(4, 7), false, this, createExecutor(createFunctor(&BigExplosion::stop)));
     96            this->destroyTimer_.setTimer(rnd(2, 4), false, this, createExecutor(createFunctor(&BigExplosion::stop)));
    9797        }
    9898        this->registerVariables();
     
    366366            this->debrisSmoke4_->setEnabled(false);
    367367
    368         if (Core::isMaster())
     368        if (GameMode::isMaster())
    369369        {
    370370            this->bStop_ = true;
     
    395395
    396396
    397 /*        if (Core::isMaster() && rnd() < dt*(this->cps_))
     397/*        if (GameMode::isMaster() && rnd() < dt*(this->cps_))
    398398        {
    399399
  • code/trunk/src/orxonox/objects/worldentities/BigExplosion.h

    • Property svn:eol-style set to native
  • code/trunk/src/orxonox/objects/worldentities/CMakeLists.txt

    r3077 r3087  
    1010  Billboard.cc
    1111  BlinkingBillboard.cc
     12  BigExplosion.cc       
    1213  ExplosionChunk.cc
    1314  FadingBillboard.cc
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3084 r3087  
    3939#include "objects/worldentities/ParticleSpawner.h"
    4040#include "objects/worldentities/ExplosionChunk.h"
     41#include "objects/worldentities/BigExplosion.h"
    4142
    4243#include "objects/weaponsystem/WeaponSystem.h"
     
    143144
    144145        if (GameMode::isMaster())
    145           if (this->health_ <= 0)
    146             this->death();
     146            if (this->health_ <= 0 && bAlive_)
     147                this->death();
    147148    }
    148149
     
    229230
    230231            if (GameMode::isMaster())
    231                 this->deatheffect();
    232         }
    233     }
    234 
     232            {
     233//                this->deathEffect();
     234                this->goWithStyle();
     235            }
     236        }
     237    }
     238    void Pawn::goWithStyle()
     239    {
     240        this->bAlive_ = false;
     241        this->setDestroyWhenPlayerLeft(false);
     242
     243        BigExplosion* chunk = new BigExplosion(this->getCreator());
     244        chunk->setPosition(this->getPosition());
     245
     246    }
    235247    void Pawn::deatheffect()
    236248    {
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h

    r3086 r3087  
    118118
    119119            virtual void death();
     120            virtual void goWithStyle();
    120121            virtual void deatheffect();
    121122            virtual void spawneffect();
Note: See TracChangeset for help on using the changeset viewer.