- Timestamp:
- Nov 8, 2015, 6:19:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/worldentities/pawns/Pawn.cc
r10731 r10780 299 299 } 300 300 301 302 301 void Pawn::kill() 303 302 { … … 320 319 } 321 320 322 323 321 void Pawn::death() 324 322 { … … 326 324 if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_)) 327 325 { 328 // Set bAlive_ to false and wait for PawnManagerto do the destruction326 // Set bAlive_ to false and wait for destroyLater() to do the destruction 329 327 this->bAlive_ = false; 328 this->destroyLater(); 330 329 331 330 this->setDestroyWhenPlayerLeft(false); … … 367 366 if (GameMode::isMaster()) 368 367 { 369 // this->deathEffect();368 this->deatheffect(); 370 369 this->goWithStyle(); 371 370 } … … 387 386 { 388 387 // play death effect 389 {388 /*{ 390 389 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 391 390 effect->setPosition(this->getPosition()); … … 410 409 effect->setSource("Orxonox/sparks"); 411 410 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 413 465 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 414 466 { … … 418 470 } 419 471 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 */ 420 476 void Pawn::fired(unsigned int firemode) 421 477 {
Note: See TracChangeset
for help on using the changeset viewer.