Changeset 10673 in orxonox.OLD for branches/vs-enhencements
- Timestamp:
- Jun 6, 2007, 2:38:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/projectiles/swarm_projectile.cc
r10670 r10673 200 200 this->deactivate(); 201 201 202 203 204 202 /** old guiding function*/ 205 206 203 static float projectileVelocity = this->getVelocity().len(); 207 204 if (target != NULL){ 208 staticVector estTargetDir = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized();205 Vector estTargetDir = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized(); 209 206 this->velocity = this->newDirection(this->velocity, estTargetDir, this->turningSpeed * time ); 210 207 } … … 225 222 226 223 this->angle += this->rotationSpeed * time; 227 228 while (this->angle > 360) 229 { 230 this->angle -= 360; 231 } 224 while (this->angle > 360) { this->angle -= 360; } 232 225 233 226 this->lastDir = this->curDir; … … 240 233 PRINTF(0)("Target was hit by Swarm Missile!\n"); 241 234 } 242 elseif( this->target == NULL)235 if( this->target == NULL) 243 236 this->deactivate(); 244 237 }
Note: See TracChangeset
for help on using the changeset viewer.