Changeset 9235 in orxonox.OLD for trunk/src/world_entities/playable.cc
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r9110 r9235 67 67 this->bDead = false; 68 68 69 //subscribe to collision reaction70 this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);71 69 72 70 registerVar( new SynchronizeableInt( &score, &score, "score" ) ); … … 393 391 PRINTF(0)("Playable respawn\n"); 394 392 // 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()) 396 394 State::getGameRules()->onPlayerSpawn(); 397 395 … … 403 401 404 402 405 void Playable::destroy() 406 { 407 Explosion::explode(dynamic_cast<PNode*>(this), Vector(1.0f, 1.0f, 1.0f)); 408 409 403 void Playable::destroy(WorldEntity* killer) 404 { 410 405 if( !this->bDead) 411 406 { … … 416 411 if( this == State::getPlayer()->getPlayable()) 417 412 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 that421 this->setAbsCoor(-2000.0, -2000.0, -2000.0);422 423 //explosion hack424 425 413 } 426 414 this->bDead = true; 415 416 if( State::getGameRules() != NULL) 417 State::getGameRules()->registerKill(Kill(killer, this)); 427 418 } 428 419 }
Note: See TracChangeset
for help on using the changeset viewer.