Changeset 5745 in orxonox.OLD for branches/world_entities/src/world_entities/weapons/turret.cc
- Timestamp:
- Nov 23, 2005, 9:41:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/world_entities/weapons/turret.cc
r5622 r5745 40 40 creates a new weapon 41 41 */ 42 Turret::Turret ( WeaponManager* weaponManager)43 : Weapon( weaponManager)42 Turret::Turret () 43 : Weapon() 44 44 { 45 45 this->init(); … … 117 117 { 118 118 Quaternion quat; 119 Vector direction = this->get WeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor();119 Vector direction = this->getAbsCoor();/*this->getWeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor();*/ 120 120 121 121 direction.normalize(); … … 135 135 return; 136 136 137 PNode* target = this->getWeaponManager()->getFixedTarget();138 139 if (target != NULL)140 {141 137 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 + VECTOR_RAND(13) 142 138 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 143 }144 else145 pj->setVelocity(target->getVelocity());146 139 147 140 pj->setParent(NullParent::getInstance()); … … 159 152 void Turret::draw () const 160 153 { 161 this->getWeaponManager()->getFixedTarget()->debugDraw(10);162 163 154 /* draw gun body */ 164 155 glMatrixMode(GL_MODELVIEW);
Note: See TracChangeset
for help on using the changeset viewer.