Changeset 3888 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc
- Timestamp:
- Apr 19, 2005, 1:16:16 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/test_gun.cc
r3886 r3888 47 47 this->leftRight = leftRight; 48 48 49 if( this->leftRight == 0)50 this->projOffset = new Vector(1.0, 0.0, -0.35);51 else if( this->leftRight == 1)52 this->projOffset = new Vector(1.0, 0.0, 0.5);53 54 55 //this->dummy1 = new WorldEntity(); // a world entity that is not drawed: use this for the weapon56 49 this->objectComponent1 = new PNode(); 57 50 this->animation1 = new Animation3D(this->objectComponent1); 58 59 51 parent->addChild(this->objectComponent1, PNODE_ALL); 60 52 … … 63 55 if( this->leftRight == W_LEFT) 64 56 { 57 this->projectileOffset = Vector(1.0, 0.0, -0.35); 58 65 59 this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR); 66 60 this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR); … … 69 63 else if( this->leftRight == W_RIGHT) 70 64 { 65 this->projectileOffset = Vector(1.0, 0.0, 0.5); 66 71 67 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR); 72 68 this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR); … … 119 115 return; 120 116 } 117 121 118 Projectile* pj = new TestBullet(this); 122 123 pj->setAbsCoor(this->getAbsCoor() + *this->projOffset); 119 pj->setAbsCoor(this->getAbsCoor() + this->projectileOffset); 124 120 pj->setAbsDir(this->getAbsDir()); 125 126 121 pj->setFlightDirection(this->getAbsDir()); 127 122 pj->setSpeed(this->getSpeed()); 128 129 123 this->worldEntities->add(pj); 130 124 this->localTime = 0;
Note: See TracChangeset
for help on using the changeset viewer.