Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9235 in orxonox.OLD for trunk/src/world_entities/playable.cc


Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (18 years ago)
Author:
bensch
Message:

merged the presentation back

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r9110 r9235  
    6767  this->bDead = false;
    6868
    69   //subscribe to collision reaction
    70   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    7169
    7270  registerVar( new SynchronizeableInt( &score, &score, "score" ) );
     
    393391  PRINTF(0)("Playable respawn\n");
    394392  // only if this is the spaceship of the player
    395   if( this == State::getPlayer()->getPlayable())
     393  if( State::getGameRules() && State::getPlayer() && this == State::getPlayer()->getPlayable())
    396394    State::getGameRules()->onPlayerSpawn();
    397395
     
    403401
    404402
    405 void Playable::destroy()
    406 {
    407   Explosion::explode(dynamic_cast<PNode*>(this), Vector(1.0f, 1.0f, 1.0f));
    408 
    409 
     403void Playable::destroy(WorldEntity* killer)
     404{
    410405  if( !this->bDead)
    411406  {
     
    416411      if( this == State::getPlayer()->getPlayable())
    417412        State::getGameRules()->onPlayerDeath();
    418 
    419       //     this->toList(OM_GROUP_05);
    420       //HACK: moves the entity to an unknown place far far away: in the future, GameRules will look for that
    421       this->setAbsCoor(-2000.0, -2000.0, -2000.0);
    422 
    423       //explosion hack
    424 
    425413    }
    426414    this->bDead = true;
     415   
     416    if( State::getGameRules() != NULL)
     417      State::getGameRules()->registerKill(Kill(killer, this));
    427418  }
    428419}
Note: See TracChangeset for help on using the changeset viewer.