Changeset 10271 in orxonox.OLD for branches/playability/src/world_entities/projectiles/swarm_projectile.cc
- Timestamp:
- Jan 17, 2007, 6:15:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/swarm_projectile.cc
r10261 r10271 219 219 220 220 221 /** old guiding funct uion*/221 /** old guiding function*/ 222 222 223 223 float projectileVelocity = this->getVelocity().len(); … … 229 229 if (likely(projectileVelocity != 0 || projectileVelocity != this->maxVelocity) ) 230 230 this->velocity *= (this->maxVelocity / projectileVelocity); // set speed to max 231 232 //printf("position: %f, %f, %f\n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);233 // printf("target position: %f, %f, %f\n", this->target->getAbsCoor().x, this->target->getAbsCoor().y, this->target->getAbsCoor().z); 231 /* 232 printf("position: %f, %f, %f\n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z); 233 printf("target position: %f, %f, %f\n", this->target->getAbsCoor().x, this->target->getAbsCoor().y, this->target->getAbsCoor().z);*/ 234 234 235 235 this->shiftCoor(this->velocity * time); 236 236 237 238 237 /* 238 239 239 Vector pjV = this->getVelocity(); 240 240 Vector tV = this->target->getVelocity(); … … 244 244 245 245 float A = 2 * pT.len() * pT.len(); 246 float B = 2 * a.len() * tV.len();246 float B = 2 * a.len() * a.len(); 247 247 float D = 2 * sqrt(B * B - 4 * pT.len() * pT.len() *(tV.len() * tV.len() - pjV.len() * pjV.len())); 248 248 float tti;
Note: See TracChangeset
for help on using the changeset viewer.