Changeset 10113 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Dec 19, 2006, 11:39:59 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/mbolt.cc
r10104 r10113 24 24 25 25 #include "particles/dot_emitter.h" 26 #include "particles/box_emitter.h"27 26 #include "particles/sprite_particles.h" 28 27 … … 47 46 { 48 47 this->registerObject(this, MBolt::_objectList); 49 this->loadModel("models/projectiles/mbolt.obj" );48 this->loadModel("models/projectiles/mbolt.obj",4); 50 49 51 50 … … 59 58 60 59 //this->emitter = new DotEmitter(1000, 0, 0); 61 this->emitter = new DotEmitter( 200, 0, 0);60 this->emitter = new DotEmitter(50, 0, 0); 62 61 this->emitter->setParent(this); 63 62 this->emitter->setSpread(M_PI,M_PI); … … 76 75 dynamic_cast<StaticModel*>(this->getModel())->finalize(); 77 76 77 dynamic_cast<StaticModel*>(this->getModel())->rebuild(); 78 this->buildObbTree(4); 78 79 79 80 this->trail = new Trail(6,4,.1, this); 80 81 //this->trail->setParent( this); 81 82 this->trail->setTexture( "maps/laser.png"); 82 this->trail->setAbsCoor(this->getAbsCoor() - Vector( 1,0,0));83 this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0)); 83 84 } 84 85 … … 110 111 MBolt::explosionParticles = new SpriteParticles(1000); 111 112 MBolt::explosionParticles->setName("MBoltExplosionParticles"); 112 MBolt::explosionParticles->setLifeSpan(. 5, .3);113 MBolt::explosionParticles->setLifeSpan(.2, .1); 113 114 MBolt::explosionParticles->setRadius(0.0, 10.0); 114 115 MBolt::explosionParticles->setRadius(.5, 6.0); … … 126 127 this->emitter->setSpread(0); 127 128 this->emitter->setEmissionRate(10.0); 128 this->emitter->setEmissionVelocity( 0);129 this->emitter->setEmissionVelocity(50); 129 130 } 130 131 … … 136 137 this->lifeCycle = 0.0; 137 138 138 this->toList(OM_NULL); 139 this->removeNode(); 139 //this->toList(OM_NULL); 140 this->toList(OM_DEAD); 141 //this->removeNode(); 140 142 MBolt::fastFactory->kill(this); 141 143 } … … 145 147 { 146 148 PRINTF(0)("MBolt collides pretest\n"); 149 147 150 if( entity == NULL) 148 151 return; … … 196 199 glMultMatrixf((float*)matrix); 197 200 198 glScalef(0.75 , 0.7/4, 0.7/4); // no double rescale201 glScalef(0.75/4, 0.7/16, 0.7/16); // no double rescale 199 202 200 203 this->mat->select(); 201 204 dynamic_cast<StaticModel*>(this->getModel())->draw(); 202 205 this->mat->unselect(); 203 glScalef( 1/.75,4/.7,4/.7);204 glTranslatef(- 4,0,0);206 glScalef(4/.75,16/.7,16/.7); 207 glTranslatef(-3,0,0); 205 208 this->trail->draw(); 206 209 glPopMatrix(); 207 210 glPopAttrib(); 208 211 209 210 } 211 212 } 213
Note: See TracChangeset
for help on using the changeset viewer.