- Timestamp:
- Feb 1, 2006, 6:43:11 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r6913 r6966 184 184 ge->addFlare("pictures/lense_flare/lens3.png"); 185 185 186 ge->activate();186 //ge->activate(); 187 187 } 188 188 -
trunk/src/world_entities/playable.cc
r6959 r6966 126 126 { 127 127 if (entity->isA(CL_PROJECTILE) && !State::isOnline() ) 128 { 128 129 this->decreaseHealth(entity->getHealth()); 129 130 // EXTREME HACK 131 if (this->getHealth() == 0.0f) 132 { 130 // EXTREME HACK 131 if (this->getHealth() == 0.0f) 132 { 133 this->die(); 134 } 135 } 136 } 137 138 139 void Playable::die() 140 { 133 141 //this->deactivateNode(); 134 this->emitter->setSystem(explosionParticles); 135 this->setAbsCoor(0, 0, 0); 142 this->toList(OM_DEAD); 143 this->emitter->setSystem(explosionParticles); 144 this->setAbsCoor(0, 0, 0); 136 145 //this->setAbsDir(Vector(1,0,0), 0); 137 this->emitter->setSystem(NULL); 138 } 139 } 146 this->emitter->setSystem(NULL); 147 148 149 if( this->getOwner()%2 == 0) 150 this->toList(OM_GROUP_00); 151 else 152 this->toList(OM_GROUP_01); 153 } 154 140 155 141 156 /** -
trunk/src/world_entities/playable.h
r6959 r6966 31 31 virtual void leave() = 0; 32 32 33 virtual void die(); 34 33 35 virtual bool pickup(PowerUp* powerUp); 34 36 … … 59 61 int readSync(byte* data, int maxLength ); 60 62 bool needsReadSync(); 61 63 62 64 inline void setScore( int score ) { this->score = score; } 63 65 inline int getScore() { return this->score; } … … 77 79 bool bFire; //!< If the Ship is firing. 78 80 int oldFlags; //!< Used for synchronisation 79 81 80 82 int score; 81 83 int oldScore; -
trunk/src/world_entities/space_ships/space_ship.cc
r6959 r6966 796 796 { 797 797 this->decreaseHealth( energy ); 798 } 799 800 801 798 if( this->getHealth() <= 0) 799 { 800 this->die(); 801 } 802 } 803 804 805
Note: See TracChangeset
for help on using the changeset viewer.