Changeset 10600 in orxonox.OLD for branches/cleanup/src/world_entities/weapons/light_blaster.cc
- Timestamp:
- Mar 5, 2007, 11:37:52 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cleanup/src/world_entities/weapons/light_blaster.cc
r10579 r10600 98 98 this->objComp = new PNode**[this->getBarrels()]; 99 99 this->emissionPoint = new PNode*[this->getBarrels()]; 100 this->shootAnim = new Animation3D**[this->getBarrels()];100 // this->shootAnim = new Animation3D**[this->getBarrels()]; 101 101 for (int i = 0; i < this->getBarrels(); i++) 102 102 { 103 103 this->objComp[i] = new PNode* [this->getSegs()]; 104 104 this->emissionPoint[i] = new PNode; 105 this->emissionPoint[i]->setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles105 this->emissionPoint[i]->setParent(this); 106 106 this->emissionPoint[i]->setName("EmissionPoint"); 107 107 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 108 this->shootAnim[i] = new Animation3D* [this->getSegs()];108 // this->shootAnim[i] = new Animation3D* [this->getSegs()]; 109 109 for(int j = 0; j < this->getSegs(); j++) 110 110 { 111 111 this->objComp[i][j] = new PNode; 112 this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);113 this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);112 // this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]); 113 // this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT); 114 114 } 115 115 } 116 117 for (int i = 0; i < this->getBarrels(); i++ ) 118 this->emissionPoint[i]->setRelCoor(Vector(1.19, 0.0, 0.1)); 116 /* 117 this->emissionPoint[0]->setRelCoor(Vector(1.19, 0.0, 0.1)); 118 this->emissionPoint[1]->setRelCoor(Vector(1.19, -0.07, -0.05)); 119 this->emissionPoint[2]->setRelCoor(Vector(1.19, 0.07, -0.05));*/ 120 121 this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1)); 122 this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05)); 123 this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05)); 119 124 120 125 // Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this); … … 128 133 // this->setEmissionPoint(3.8, 1.2, 0); 129 134 130 for (int i = 0; i < this->getBarrels(); i++){131 this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);132 this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);133 }135 // for (int i = 0; i < this->getBarrels(); i++){ 136 // this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR); 137 // this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR); 138 // } 134 139 135 140 … … 160 165 pj->activate(); 161 166 162 for (int i = 0; i < this->getSegs(); i++)163 this->shootAnim[this->activeBarrel][i]->replay();167 // for (int i = 0; i < this->getSegs(); i++) 168 // this->shootAnim[this->activeBarrel][i]->replay(); 164 169 165 170 // switch barrel
Note: See TracChangeset
for help on using the changeset viewer.