Changeset 5750 in orxonox.OLD for trunk/src/world_entities/weapons/turret.cc
- Timestamp:
- Nov 24, 2005, 12:13:22 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/turret.cc
r5512 r5750 30 30 #include "factory.h" 31 31 32 CREATE_FACTORY(Turret );32 CREATE_FACTORY(Turret, CL_TURRET); 33 33 34 34 using namespace std; 35 35 36 37 36 /** 38 37 * standard constructor 39 40 creates a new weapon41 */42 Turret::Turret ( WeaponManager* weaponManager)43 : Weapon( weaponManager)38 * 39 * creates a new Turret 40 */ 41 Turret::Turret () 42 : Weapon() 44 43 { 45 44 this->init(); … … 53 52 } 54 53 55 54 /** 55 * creates a new Turret from a TiXmlElement 56 */ 56 57 Turret::Turret(const TiXmlElement* root) 57 58 { … … 117 118 { 118 119 Quaternion quat; 119 Vector direction = this->get WeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor();120 Vector direction = this->getAbsCoor();/*this->getWeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor();*/ 120 121 121 122 direction.normalize(); … … 135 136 return; 136 137 137 PNode* target = this->getWeaponManager()->getFixedTarget();138 139 if (target != NULL)140 {141 138 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0 + VECTOR_RAND(13) 142 139 /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity()); 143 }144 else145 pj->setVelocity(target->getVelocity());146 140 147 141 pj->setParent(NullParent::getInstance()); … … 159 153 void Turret::draw () const 160 154 { 161 this->getWeaponManager()->getFixedTarget()->debugDraw(10);162 163 155 /* draw gun body */ 164 156 glMatrixMode(GL_MODELVIEW);
Note: See TracChangeset
for help on using the changeset viewer.