Changeset 6255 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities
- Timestamp:
- Dec 21, 2005, 5:31:17 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src/world_entities
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/creatures/md2_creature.cc
r6222 r6255 303 303 //orient the MD2Creature in direction of the mouse 304 304 this->setAbsDir(mouseDirX); 305 this->cameraConnNode.set AbsDirSoft(mouseDirX*mouseDirY, 10);305 this->cameraConnNode.setRelDir(mouseDirY); 306 306 307 307 this->getWeaponManager()->tick(time); -
branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
r6234 r6255 286 286 287 287 //orient the spaceship in direction of the mouse 288 rotQuat = Quaternion::quatSlerp( this->getAbsDir(), mouseDir, fabsf(time)*3.0);288 rotQuat = Quaternion::quatSlerp( this->getAbsDir(), mouseDir, 1); 289 289 if (this->getAbsDir().distance(rotQuat) > 0.00000000000001) 290 290 this->setAbsDir( rotQuat); … … 466 466 //if (this->getWeaponManager()->hasFreeSlot(3)) 467 467 { 468 turret = new AimingTurret(); 468 turret = dynamic_cast<Weapon*>(Factory::fabricate(CL_TARGETING_TURRET)); 469 if (turret != NULL) 469 470 this->getWeaponManager()->addWeapon(turret, 3); 470 471 -
branches/spaceshipcontrol/src/world_entities/weapons/aiming_turret.cc
r6074 r6255 90 90 91 91 this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET); 92 this->setProjectileType(CL_ GUIDED_MISSILE);92 this->setProjectileType(CL_ROCKET); 93 93 94 94 … … 142 142 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 143 143 144 pj->setTarget(this->target->getParent());145 144 pj->setParent(PNode::getNullParent()); 146 145 pj->setAbsCoor(this->getEmissionPoint()); -
branches/spaceshipcontrol/src/world_entities/weapons/guided_missile.cc
r6234 r6255 44 44 this->energyMax = 10; 45 45 this->lifeSpan = 10.0; 46 this->agility = 4;46 this->agility = 500; 47 47 this->maxVelocity = 75; 48 48 … … 156 156 correctionVector = (( ( diffVector * (speed * speed/( velocity.dot(diffVector ) ) )) - velocity).getNormalized()) * agility; 157 157 158 if(velocity.dot(diffVector) > 0) 158 if( (diffVector * (speed * speed/( velocity.dot(diffVector ) ) ) -velocity).len() < agility ) 159 velocity = ((diffVector * (speed * speed/( velocity.dot(diffVector ) ) )).getNormalized())*agility; 160 else if(velocity.dot(diffVector) > 0) 159 161 velocity += correctionVector; 160 162 else if (velocity.dot(diffVector) < 0)
Note: See TracChangeset
for help on using the changeset viewer.