Changeset 6959 in orxonox.OLD for trunk/src/world_entities/playable.cc
- Timestamp:
- Feb 1, 2006, 4:40:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r6871 r6959 28 28 29 29 30 #include "dot_emitter.h" 31 #include "sprite_particles.h" 32 33 30 34 Playable::Playable() 31 35 { … … 43 47 44 48 this->setSynchronized(true); 49 50 this->score = 0; 51 this->oldScore = 0; 52 53 54 this->emitter = new DotEmitter(100, 5, M_2_PI); 55 this->emitter->setParent(this); 56 this->emitter->setSpread(M_PI, M_PI); 57 this->emitter->setEmissionRate(300.0); 58 this->emitter->setEmissionVelocity(50.0); 59 60 this->explosionParticles = new SpriteParticles(1000); 61 this->explosionParticles->setName("LaserExplosionParticles"); 62 this->explosionParticles->setLifeSpan(.5, .3); 63 this->explosionParticles->setRadius(0.0, 10.0); 64 this->explosionParticles->setRadius(.5, 6.0); 65 this->explosionParticles->setRadius(1.0, 3.0); 66 this->explosionParticles->setColor(0.0, 1,1,0,.9); 67 this->explosionParticles->setColor(0.5, .8,.8,0,.5); 68 this->explosionParticles->setColor(1.0, .8,.8,.7,.0); 45 69 } 46 70 … … 101 125 void Playable::collidesWith(WorldEntity* entity, const Vector& location) 102 126 { 103 if (entity->isA(CL_PROJECTILE) )127 if (entity->isA(CL_PROJECTILE) && !State::isOnline() ) 104 128 this->decreaseHealth(entity->getHealth()); 105 129 106 130 // EXTREME HACK 107 131 if (this->getHealth() == 0.0f) 108 this->deactivateNode(); 132 { 133 //this->deactivateNode(); 134 this->emitter->setSystem(explosionParticles); 135 this->setAbsCoor(0, 0, 0); 136 //this->setAbsDir(Vector(1,0,0), 0); 137 this->emitter->setSystem(NULL); 138 } 109 139 } 110 140 … … 248 278 } 249 279 280 #define DATA_FLAGS 1 281 #define DATA_SCORE 2 282 250 283 #define FLAGS_bFire 1 251 284 … … 281 314 bool Playable::needsReadSync( ) 282 315 { 316 //if ( score != oldScore ) 317 // return true; 318 283 319 byte flags = 0; 284 320
Note: See TracChangeset
for help on using the changeset viewer.