Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 8, 2015, 6:19:12 PM (9 years ago)
Author:
gania
Message:

fixed firing direction

Location:
code/branches/AI_HS15/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

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

    r10731 r10780  
    299299    }
    300300
    301 
    302301    void Pawn::kill()
    303302    {
     
    320319    }
    321320
    322 
    323321    void Pawn::death()
    324322    {
     
    326324        if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
    327325        {
    328             // Set bAlive_ to false and wait for PawnManager to do the destruction
     326            // Set bAlive_ to false and wait for destroyLater() to do the destruction
    329327            this->bAlive_ = false;
     328            this->destroyLater();
    330329
    331330            this->setDestroyWhenPlayerLeft(false);
     
    367366            if (GameMode::isMaster())
    368367            {
    369 //                this->deathEffect();
     368                this->deatheffect();
    370369                this->goWithStyle();
    371370            }
     
    387386    {
    388387        // play death effect
    389         {
     388        /*{
    390389            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
    391390            effect->setPosition(this->getPosition());
     
    410409            effect->setSource("Orxonox/sparks");
    411410            effect->setLifetime(4.0f);
    412         }
     411        }*/
     412       
     413       
     414        {
     415            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
     416            effect->setPosition(this->getPosition());
     417            effect->setOrientation(this->getOrientation());
     418            effect->setDestroyAfterLife(true);
     419            effect->setSource("orxonox/explosion_flash2");
     420            effect->setLifetime(5.0f);
     421        }
     422        {
     423            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
     424            effect->setPosition(this->getPosition());
     425            effect->setOrientation(this->getOrientation());
     426            effect->setDestroyAfterLife(true);
     427            effect->setSource("orxonox/explosion_flame2");
     428            effect->setLifetime(5.0f);
     429        }
     430        {
     431            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
     432            effect->setPosition(this->getPosition());
     433            effect->setOrientation(this->getOrientation());
     434            effect->setDestroyAfterLife(true);
     435            effect->setSource("orxonox/explosion_shockwave2");
     436            effect->scale(20);
     437            effect->setLifetime(5.0f);
     438        }{
     439            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
     440            effect->setPosition(this->getPosition());
     441            effect->setOrientation(this->getOrientation());
     442            effect->setDestroyAfterLife(true);
     443            effect->setSource("orxonox/explosion_sparks2");
     444            effect->setLifetime(5.0f);
     445        }
     446        {
     447            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
     448            effect->setPosition(this->getPosition());
     449            effect->setOrientation(this->getOrientation());
     450            effect->setDestroyAfterLife(true);
     451            effect->setSource("orxonox/explosion_streak2");
     452            effect->setLifetime(5.0f);
     453        }
     454        {
     455            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
     456            effect->setPosition(this->getPosition());
     457            effect->setOrientation(this->getOrientation());
     458            effect->setDestroyAfterLife(true);
     459            effect->setSource("orxonox/explosion_afterglow");
     460            effect->scale(20);
     461            effect->setLifetime(5.0f);
     462        }
     463       
     464       
    413465        for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
    414466        {
     
    418470    }
    419471
     472    /**
     473    @brief
     474        Check whether the Pawn has a @ref Orxonox::WeaponSystem and fire it with the specified firemode if it has one.
     475    */
    420476    void Pawn::fired(unsigned int firemode)
    421477    {
  • code/branches/AI_HS15/src/orxonox/worldentities/pawns/Pawn.h

    r10731 r10780  
    3939
    4040namespace orxonox // tolua_export
    41 { // tolua_export
     41{
     42    /**
     43    @brief
     44        Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
     45        its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at
     46        or below zero. If it is, the pawn gets killed.
     47
     48        Pawns can carry pickups and fire weapons. The can also have shields.
     49
     50        Notice that every Pawn is a ControllableEntity.
     51    */
     52
     53    // tolua_export
    4254    class _OrxonoxExport Pawn // tolua_export
    4355        : public ControllableEntity, public RadarViewable, public PickupCarrier
Note: See TracChangeset for help on using the changeset viewer.