Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10752


Ignore:
Timestamp:
Nov 2, 2015, 3:23:03 PM (9 years ago)
Author:
vaydin
Message:

Deleted previously created VaydinExplosion class, created ExplosionPart class

Location:
code/branches/explosionChunksHS15
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/explosionChunksHS15/data/levels/emptyLevel.oxw

    r10669 r10752  
    3838        <templates>
    3939                      <Template link=spaceshipassff />
    40                     </templates>
     40        </templates>
     41         
     42                   
    4143    </SpaceShip>
    4244    <SpaceShip
     
    4749                      <Template link=spaceshipassff />
    4850                    </templates>
     51                    <explosion>
     52
     53          <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" />
     54          <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" />
     55
     56        </explosion>
     57                   
    4958    </SpaceShip>
    5059    <SpaceShip
     
    5564                      <Template link=spaceshipassff />
    5665                    </templates>
     66                    <explosion>
     67
     68          <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" />
     69          <ExplosionPart mesh="ship.mesh" effect="Orxonox/smoke7" />
     70
     71        </explosion>
     72                   
    5773    </SpaceShip>
    5874   
  • code/branches/explosionChunksHS15/data/levels/templates/spaceshipEscort.oxt

    r10669 r10752  
    55   spawnparticlesource    = "Orxonox/fairytwirl"
    66   spawnparticleduration  = 3
    7    explosionchunks        = 40
     7   explosionchunks        = 10
    88
    99   health            = 80
  • code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt

    r10669 r10752  
    1212  SpawnPoint.cc
    1313  TeamSpawnPoint.cc
    14   VaydinExplosion.cc
     14  ExplosionPart.cc
    1515)
    1616
  • code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc

    r10669 r10752  
    4242#include "worldentities/ExplosionChunk.h"
    4343#include "worldentities/BigExplosion.h"
    44 //#include "worldentities/VaydinExplosion.h"
     44#include "worldentities/ExplosionPart.h"
    4545#include "weaponsystem/WeaponSystem.h"
    4646#include "weaponsystem/WeaponSlot.h"
     
    8686        this->aimPosition_ = Vector3::ZERO;
    8787
     88        //this->explosionPartList_ = NULL;
     89
    8890        if (GameMode::isMaster())
    8991        {
     
    144146        XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
    145147
    146         //XMLPortObject(Pawn, VaydinExplosion, "vaydinexplosion", addVaydinExplosion, getVaydinExplosion, xmlelement, mode);
     148        XMLPortObject(Pawn, ExplosionPart, "explosion", addExplosionPart, getExplosionPart, xmlelement, mode);
    147149
    148150        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
     
    385387        this->setDestroyWhenPlayerLeft(false);
    386388
    387         BigExplosion* chunk = new BigExplosion(this->getContext());
     389        /*ExplosionPart* chunk = new ExplosionPart(this->getContext());
    388390        chunk->setPosition(this->getPosition());
    389391        chunk->setVelocity(this->getVelocity());
     392        chunk->Explode();*/
     393
     394        while(!explosionPartList_.empty())
     395        {
     396            explosionPartList_.back()->setPosition(this->getPosition());
     397            explosionPartList_.back()->setVelocity(this->getVelocity());
     398            explosionPartList_.back()->Explode();
     399            explosionPartList_.pop_back();
     400        }
    390401
    391402        this->explosionSound_->setPosition(this->getPosition());
     
    497508            this->spawneffect();
    498509    }
     510
     511
     512    void Pawn::addExplosionPart(ExplosionPart* ePart)
     513    {this->explosionPartList_.push_back(ePart);}
     514
     515
     516    ExplosionPart * Pawn::getExplosionPart()
     517    {return this->explosionPartList_.back();}
     518
     519
    499520
    500521    /* WeaponSystem:
  • code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.h

    r10437 r10752  
    3333
    3434#include <string>
     35#include <vector>
    3536#include "interfaces/PickupCarrier.h"
    3637#include "interfaces/RadarViewable.h"
    3738#include "worldentities/ControllableEntity.h"
     39#include "worldentities/ExplosionPart.h"
    3840
    3941
     
    147149            virtual void postSpawn();
    148150
     151            void addExplosionPart(ExplosionPart* ePart);
     152            ExplosionPart * getExplosionPart();
     153
    149154            void addWeaponSlot(WeaponSlot * wSlot);
    150155            WeaponSlot * getWeaponSlot(unsigned int index) const;
     
    241246            unsigned int numexplosionchunks_;
    242247
     248            std::vector<ExplosionPart*> explosionPartList_;
     249
    243250        private:
    244251            void registerVariables();
  • code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/SpaceShip.cc

    r10216 r10752  
    115115
    116116        XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode);
     117
     118       
    117119    }
    118120
Note: See TracChangeset for help on using the changeset viewer.