Changeset 7044 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Feb 6, 2006, 2:09:01 AM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r7014 r7044 27 27 #include "power_ups/param_power_up.h" 28 28 29 #include "game_rules.h" 29 30 30 31 #include "dot_emitter.h" … … 136 137 137 138 138 void Playable::die() 139 { 140 //this->deactivateNode(); 141 this->toList(OM_DEAD); 142 this->emitter->setSystem(explosionParticles); 143 this->setAbsCoor(0, 0, 0); 144 //this->setAbsDir(Vector(1,0,0), 0); 145 this->emitter->setSystem(NULL); 146 139 void Playable::respawn() 140 { 141 PRINTF(0)("Playable respawn\n"); 142 // only if this is the spaceship of the player 143 if( this == State::getPlayer()->getPlayable()) 144 State::getGameRules()->onPlayerSpawn(); 145 146 this->setAbsCoor(0.0, 0.0, 0.0); 147 147 148 148 if( this->getOwner()%2 == 0) … … 150 150 else 151 151 this->toList(OM_GROUP_01); 152 } 153 154 155 void Playable::die() 156 { 157 PRINTF(0)("Playable dies\n"); 158 // only if this is the spaceship of the player 159 if( this == State::getPlayer()->getPlayable()) 160 State::getGameRules()->onPlayerDeath(); 161 162 this->toList(OM_DEAD); 163 //.HACK: moves the entity to an unknown place far far away: in the future, GameRules will look for that 164 this->setAbsCoor(-2000.0, -2000.0, -2000.0); 165 166 //explosion hack 167 this->emitter->setSystem(explosionParticles); 168 this->setAbsCoor(0, 0, 0); 169 this->emitter->setSystem(NULL); 152 170 } 153 171 -
trunk/src/world_entities/playable.h
r6994 r7044 30 30 31 31 virtual void die(); 32 virtual void respawn(); 32 33 33 34 virtual bool pickup(PowerUp* powerUp);
Note: See TracChangeset
for help on using the changeset viewer.