Changeset 9162 in orxonox.OLD for branches/presentation
- Timestamp:
- Jul 4, 2006, 6:15:10 PM (19 years ago)
- Location:
- branches/presentation/src
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/presentation/src/lib/coord/p_node.cc ¶
r8316 r9162 1089 1089 void PNode::varChangeHandler( std::list< int > & id ) 1090 1090 { 1091 Synchronizeable::varChangeHandler( id ); 1092 1091 1093 if ( std::find( id.begin(), id.end(), relCoordinate_handle ) != id.end() ) 1092 1094 { -
TabularUnified branches/presentation/src/util/multiplayer_team_deathmatch.cc ¶
r9141 r9162 210 210 while ( this->killList.begin() != this->killList.end() ) 211 211 { 212 PRINTF(0)("KKKKKKKKIIIIIIIIILLLLLLLLLLLLL\n"); 212 213 onKill( this->killList.begin()->getVictim(), this->killList.begin()->getKiller() ); 213 214 this->killList.erase( this->killList.begin() ); … … 709 710 { 710 711 if ( !victim ) 711 return; 712 { 713 PRINTF(0)("victim == NULL\n"); 714 return; 715 } 712 716 if ( !killer ) 713 return; 717 { 718 PRINTF(0)("killer == NULL\n"); 719 return; 720 } 714 721 715 722 int killerUserId = killer->getOwner(); 716 723 int victimUserId = victim->getOwner(); 724 725 PRINTF(0)("%d %d %x %x %s %s\n", killerUserId, victimUserId, killer, victim, killer->getClassName(), victim->getClassName()); 717 726 718 727 PlayerStats & victimStats = *PlayerStats::getStats( victimUserId ); … … 720 729 721 730 if ( killerStats.getPlayable() != killer || victimStats.getPlayable() != victim ) 722 return; 731 { 732 PRINTF(0)("killerStats.getPlayable() != killer || victimStats.getPlayable() != victim\n"); 733 PRINTF(0)("%x %x %x %x\n", killerStats.getPlayable(), killer, victimStats.getPlayable(), victim ); 734 PRINTF(0)("%d %d %d %d\n", killerStats.getPlayable()->getUniqueID(), killer->getUniqueID(), victimStats.getPlayable()->getUniqueID(), victim->getUniqueID() ); 735 return; 736 } 723 737 724 738 //check for suicide -
TabularUnified branches/presentation/src/world_entities/creatures/fps_player.cc ¶
r9160 r9162 416 416 } 417 417 418 void FPSPlayer::destroy( WorldEntity* killer ) 419 { 420 Playable::destroy( killer ); 421 422 toList( OM_DEAD ); 423 } 424 -
TabularUnified branches/presentation/src/world_entities/creatures/fps_player.h ¶
r9150 r9162 27 27 virtual void reset(); 28 28 29 virtual void destroy(WorldEntity* killer); 29 30 virtual void respawn(); 30 31 -
TabularUnified branches/presentation/src/world_entities/npcs/generic_npc.cc ¶
r9145 r9162 581 581 582 582 583 void GenericNPC::destroy( )583 void GenericNPC::destroy(WorldEntity* killer) 584 584 { 585 585 int randi = (int)(5.0f * (float)rand()/(float)RAND_MAX); -
TabularUnified branches/presentation/src/world_entities/npcs/generic_npc.h ¶
r9061 r9162 77 77 78 78 79 v oid destroy();79 virtual void destroy(WorldEntity* killer); 80 80 81 81 private: -
TabularUnified branches/presentation/src/world_entities/npcs/ground_turret.cc ¶
r8777 r9162 176 176 } 177 177 178 void GroundTurret::destroy( )178 void GroundTurret::destroy(WorldEntity* killer) 179 179 { 180 180 this->setAbsDirSoft(Quaternion(-90, Vector(0,0,1)), 90); -
TabularUnified branches/presentation/src/world_entities/npcs/ground_turret.h ¶
r7954 r9162 25 25 virtual void leftWorld (); 26 26 27 virtual void destroy( );27 virtual void destroy(WorldEntity* killer); 28 28 29 29 virtual void draw() const; -
TabularUnified branches/presentation/src/world_entities/playable.cc ¶
r9138 r9162 401 401 402 402 403 void Playable::destroy() 404 { 405 Explosion::explode(dynamic_cast<PNode*>(this), Vector(1.0f, 1.0f, 1.0f)); 406 407 403 void Playable::destroy(WorldEntity* killer) 404 { 408 405 if( !this->bDead) 409 406 { … … 414 411 if( this == State::getPlayer()->getPlayable()) 415 412 State::getGameRules()->onPlayerDeath(); 416 417 // this->toList(OM_GROUP_05);418 //HACK: moves the entity to an unknown place far far away: in the future, GameRules will look for that419 this->setAbsCoor(-2000.0, -2000.0, -2000.0);420 421 //explosion hack422 423 413 } 424 414 this->bDead = true; 415 416 if( State::getGameRules() != NULL) 417 State::getGameRules()->registerKill(Kill(killer, this)); 425 418 } 426 419 } -
TabularUnified branches/presentation/src/world_entities/playable.h ¶
r9061 r9162 80 80 81 81 // WorldEntity Extensions 82 virtual void destroy( );82 virtual void destroy(WorldEntity* killer); 83 83 virtual void respawn(); 84 84 virtual void collidesWith(WorldEntity* entity, const Vector& location); -
TabularUnified branches/presentation/src/world_entities/projectiles/guided_missile.cc ¶
r8362 r9162 135 135 { 136 136 if (this->hitEntity != entity) 137 this->destroy( );137 this->destroy( entity ); 138 138 this->hitEntity = entity; 139 139 } … … 180 180 * the function gets called, when the projectile is destroyed 181 181 */ 182 void GuidedMissile::destroy ( )183 { 184 Projectile::destroy( );182 void GuidedMissile::destroy (WorldEntity* killer) 183 { 184 Projectile::destroy( killer ); 185 185 PRINTF(5)("DESTROY GuidedMissile\n"); 186 186 this->lifeCycle = .95; //!< @todo calculate this usefully. -
TabularUnified branches/presentation/src/world_entities/projectiles/guided_missile.h ¶
r6622 r9162 26 26 virtual void collidesWith(WorldEntity* entity, const Vector& location); 27 27 28 virtual void destroy ( );28 virtual void destroy (WorldEntity* killer); 29 29 30 30 virtual void tick (float time); -
TabularUnified branches/presentation/src/world_entities/projectiles/hyperblast.cc ¶
r8362 r9162 126 126 * the function gets called, when the projectile is destroyed 127 127 */ 128 void Hyperblast::destroy ( )128 void Hyperblast::destroy (WorldEntity* killer) 129 129 { 130 Projectile::destroy( );130 Projectile::destroy( killer ); 131 131 132 132 PRINTF(5)("DESTROY Hyperblast\n"); -
TabularUnified branches/presentation/src/world_entities/projectiles/hyperblast.h ¶
r6821 r9162 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float time); -
TabularUnified branches/presentation/src/world_entities/projectiles/laser.cc ¶
r9061 r9162 107 107 { 108 108 if (this->hitEntity != entity && entity->isA(CL_NPC)) 109 this->destroy( );109 this->destroy( entity ); 110 110 this->hitEntity = entity; 111 111 } … … 128 128 * the function gets called, when the projectile is destroyed 129 129 */ 130 void Laser::destroy ( )130 void Laser::destroy (WorldEntity* killer) 131 131 { 132 Projectile::destroy( );132 Projectile::destroy( killer ); 133 133 PRINTF(5)("DESTROY Laser\n"); 134 134 this->lifeCycle = .95; //!< @todo calculate this usefully. -
TabularUnified branches/presentation/src/world_entities/projectiles/laser.h ¶
r6622 r9162 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float dt); -
TabularUnified branches/presentation/src/world_entities/projectiles/projectile.cc ¶
r8362 r9162 162 162 163 163 if (this->tickLifeCycle(dt)) 164 this->destroy( );164 this->destroy( NULL ); 165 165 } 166 166 … … 169 169 * the function gets called, when the projectile is destroyed 170 170 */ 171 void Projectile::destroy ( )171 void Projectile::destroy (WorldEntity* killer) 172 172 { 173 173 if (this->explosionBuffer != NULL) -
TabularUnified branches/presentation/src/world_entities/projectiles/projectile.h ¶
r7460 r9162 41 41 virtual void deactivate() = 0; 42 42 43 virtual void destroy ( );43 virtual void destroy (WorldEntity* killer); 44 44 45 45 virtual void tick (float dt); -
TabularUnified branches/presentation/src/world_entities/projectiles/rocket.cc ¶
r8362 r9162 128 128 { 129 129 if (this->hitEntity != entity) 130 this->destroy( );130 this->destroy( entity ); 131 131 this->hitEntity = entity; 132 132 } … … 149 149 * the function gets called, when the projectile is destroyed 150 150 */ 151 void Rocket::destroy ( )151 void Rocket::destroy (WorldEntity* killer) 152 152 { 153 Projectile::destroy( );153 Projectile::destroy( killer ); 154 154 155 155 PRINTF(5)("DESTROY Rocket\n"); -
TabularUnified branches/presentation/src/world_entities/projectiles/rocket.h ¶
r6622 r9162 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float time); -
TabularUnified branches/presentation/src/world_entities/projectiles/test_bullet.cc ¶
r8362 r9162 119 119 { 120 120 if (this->hitEntity != entity && entity->isA(CL_NPC)) 121 this->destroy( );121 this->destroy( entity ); 122 122 this->hitEntity = entity; 123 123 } … … 147 147 * the function gets called, when the projectile is destroyed 148 148 */ 149 void TestBullet::destroy ( )149 void TestBullet::destroy (WorldEntity* killer) 150 150 { 151 151 PRINTF(5)("DESTROY TestBullet\n"); -
TabularUnified branches/presentation/src/world_entities/projectiles/test_bullet.h ¶
r6624 r9162 27 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 28 28 29 virtual void destroy ( );29 virtual void destroy (WorldEntity* killer); 30 30 31 31 virtual void tick (float time); -
TabularUnified branches/presentation/src/world_entities/space_ships/space_ship.cc ¶
r9110 r9162 513 513 } 514 514 515 void SpaceShip::destroy( )515 void SpaceShip::destroy( WorldEntity* killer ) 516 516 { 517 517 PRINTF(0)("spaceship destroy\n"); -
TabularUnified branches/presentation/src/world_entities/space_ships/space_ship.h ¶
r9008 r9162 37 37 virtual void leftWorld(); 38 38 39 virtual void destroy( );39 virtual void destroy(WorldEntity* killer); 40 40 virtual void respawn(); 41 41 -
TabularUnified branches/presentation/src/world_entities/test_entity.cc ¶
r9003 r9162 116 116 if( this->lastCollided != entity) 117 117 { 118 this->destroy( );118 this->destroy( entity ); 119 119 this->lastCollided = entity; 120 120 … … 126 126 127 127 128 void TestEntity::destroy( )128 void TestEntity::destroy(WorldEntity* killer) 129 129 { 130 130 if( this->bDeath) -
TabularUnified branches/presentation/src/world_entities/test_entity.h ¶
r8778 r9162 25 25 void setAnim(int animationIndex, int animPlaybackMode); 26 26 27 virtual void destroy( );27 virtual void destroy(WorldEntity* killer); 28 28 29 29 virtual void tick (float time); -
TabularUnified branches/presentation/src/world_entities/world_entity.cc ¶
r9122 r9162 750 750 else 751 751 { 752 this->destroy(); 753 754 if( State::getGameRules() != NULL) 755 State::getGameRules()->registerKill(Kill(killer, this)); 752 this->destroy( killer ); 756 753 } 757 754 } … … 761 758 * destoys the world entity 762 759 */ 763 void WorldEntity::destroy( )760 void WorldEntity::destroy(WorldEntity* killer) 764 761 { 765 762 this->toList(OM_DEAD); -
TabularUnified branches/presentation/src/world_entities/world_entity.h ¶
r9110 r9162 101 101 virtual void hit(float damage, WorldEntity* killer); 102 102 103 virtual void destroy( );103 virtual void destroy( WorldEntity* killer ); 104 104 105 105
Note: See TracChangeset
for help on using the changeset viewer.