Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6966 in orxonox.OLD for trunk


Ignore:
Timestamp:
Feb 1, 2006, 6:43:11 PM (19 years ago)
Author:
patrick
Message:

trunk: deactivated the lenseflare temp

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r6913 r6966  
    184184  ge->addFlare("pictures/lense_flare/lens3.png");
    185185
    186   ge->activate();
     186  //ge->activate();
    187187}
    188188
  • trunk/src/world_entities/playable.cc

    r6959 r6966  
    126126{
    127127  if (entity->isA(CL_PROJECTILE) && !State::isOnline() )
     128  {
    128129    this->decreaseHealth(entity->getHealth());
    129 
    130   // EXTREME HACK
    131   if (this->getHealth() == 0.0f)
    132   {
     130    // EXTREME HACK
     131    if (this->getHealth() == 0.0f)
     132    {
     133      this->die();
     134    }
     135  }
     136}
     137
     138
     139void Playable::die()
     140{
    133141    //this->deactivateNode();
    134     this->emitter->setSystem(explosionParticles);
    135     this->setAbsCoor(0, 0, 0);
     142  this->toList(OM_DEAD);
     143  this->emitter->setSystem(explosionParticles);
     144  this->setAbsCoor(0, 0, 0);
    136145    //this->setAbsDir(Vector(1,0,0), 0);
    137     this->emitter->setSystem(NULL);
    138   }
    139 }
     146  this->emitter->setSystem(NULL);
     147
     148
     149  if( this->getOwner()%2 == 0)
     150    this->toList(OM_GROUP_00);
     151  else
     152    this->toList(OM_GROUP_01);
     153}
     154
    140155
    141156/**
  • trunk/src/world_entities/playable.h

    r6959 r6966  
    3131    virtual void leave() = 0;
    3232
     33    virtual void die();
     34
    3335    virtual bool pickup(PowerUp* powerUp);
    3436
     
    5961    int       readSync(byte* data, int maxLength );
    6062    bool      needsReadSync();
    61    
     63
    6264    inline void setScore( int score ) { this->score = score; }
    6365    inline int  getScore() { return this->score; }
     
    7779    bool                  bFire;              //!< If the Ship is firing.
    7880    int                   oldFlags;           //!< Used for synchronisation
    79    
     81
    8082    int                   score;
    8183    int                   oldScore;
  • trunk/src/world_entities/space_ships/space_ship.cc

    r6959 r6966  
    796796{
    797797  this->decreaseHealth( energy );
    798 }
    799 
    800 
    801 
     798  if( this->getHealth() <= 0)
     799  {
     800    this->die();
     801  }
     802}
     803
     804
     805
Note: See TracChangeset for help on using the changeset viewer.