Changeset 5765 in orxonox.OLD for branches/guidedmissile/src/world_entities/weapons/aiming_turret.cc
- Timestamp:
- Nov 24, 2005, 5:24:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guidedmissile/src/world_entities/weapons/aiming_turret.cc
r5764 r5765 84 84 animation2->setInfinity(ANIM_INF_CONSTANT); 85 85 86 this->setStateDuration(WS_SHOOTING, .1);87 this->setStateDuration(WS_RELOADING, .1);86 this->setStateDuration(WS_SHOOTING, 1.0); 87 this->setStateDuration(WS_RELOADING, 2.0); 88 88 this->setStateDuration(WS_ACTIVATING, .4); 89 89 this->setStateDuration(WS_DEACTIVATING, .4); … … 127 127 direction.normalize(); 128 128 129 if (likely (this->getParent() != NULL))130 quat = Quaternion(direction, this->getParent()->getAbsDir().apply(Vector(0,1,0))) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;131 else132 quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;129 // if (likely (this->getParent() != NULL)) 130 // quat = Quaternion(direction, this->getParent()->getAbsDir().apply(Vector(0,1,0))) * Quaternion ( -M_PI_2, Vector(0,1,0)) ; 131 // else 132 // quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ; 133 133 134 this->setAbsDirSoft(quat, 5); 134 quat = Quaternion(.5, Vector(0,0,1)); 135 136 this->setRelDir(quat); 135 137 136 138 this->target->tick(dt); … … 143 145 return; 144 146 145 pj->setVelocity( /*this->getVelocity()+*/(this->getAbsDir().apply(Vector(1,0,0))*250.0 + VECTOR_RAND(13)147 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*50.0 + VECTOR_RAND(13) 146 148 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 147 149 pj->setTarget(this->target->getParent());
Note: See TracChangeset
for help on using the changeset viewer.