Changeset 10260 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Jan 17, 2007, 4:00:23 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/spike.cc
r10196 r10260 140 140 141 141 angle += rotationSpeed * dt; 142 143 /* printf( "spike tick\n" );*/ 142 144 } 143 145 -
branches/playability/src/world_entities/projectiles/spike_ball.cc
r10256 r10260 68 68 69 69 this->size = 4; 70 71 this->launcher = new Vector [this->getFragments()]; 72 70 73 // this->fastFactory = tFastFactory<Spike>::getFastFactory(CL_SPIKE, "Spike"); 71 74 … … 120 123 SpikeBall::explosionParticles->setColor(1.0, .8,.8,.7,.0); 121 124 } 122 123 125 this->setDamage(5); 124 126 this->setHealth(0); … … 177 179 { 178 180 Spike* pj = NULL; 179 181 /* printf( "KA-" );*/ 180 182 for ( int i = 0; i < this->getFragments(); i++) 181 183 { 182 184 pj = new Spike(); 183 if (pj == NULL) 184 return; 185 185 assert( pj ); 186 /* printf(" %i", i);*/ 186 187 pj->setParent(PNode::getNullParent()); 187 188 … … 192 193 Quaternion q; 193 194 pj->setAbsDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1))); 195 196 pj->toList(this->getOMListNumber()); 197 194 198 /* 195 199 pj->setAbsCoor(this->getAbsCoor() + VECTOR_RAND(3)); … … 197 201 pj->activate(); 198 202 } 203 /* printf( "BOOM\n" );*/ 199 204 } 200 205 … … 250 255 { 251 256 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); 252 Vector v = this-> velocity* dt;257 Vector v = this->getVelocity() * dt; 253 258 this->shiftCoor(v); 254 259 255 if(this->lifeCycle > .9){ 256 // printf("called by spikeball "); 257 // this->weaponMan->fire(); 260 // if(this->lifeCycle > .9){ 261 // /* printf("time to blow: ");*/ 262 // // this->weaponMan->fire(); 263 // /* this->blow();*/ 264 // } 265 266 if (this->tickLifeCycle(dt)){ 258 267 this->blow(); 259 } 260 261 if (this->tickLifeCycle(dt)) 262 this->deactivate(); 268 this->deactivate(); 269 } 263 270 264 271 this->updateAngle( dt ); -
branches/playability/src/world_entities/projectiles/spike_ball.h
r10256 r10260 41 41 virtual void draw () const; 42 42 43 // inline void setVelocity(Vector velocity) { this->velocity = velocity; } 44 43 45 // inline Vector getRotationVector() { return this->rotationVector; } 44 46 // inline float getAngle() { return this->angle; }
Note: See TracChangeset
for help on using the changeset viewer.