Changeset 10771 in orxonox.OLD for branches/presentation/src/world_entities/weapons/light_blaster.cc
- Timestamp:
- Jun 27, 2007, 7:01:08 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/light_blaster.cc
r10698 r10771 53 53 { 54 54 55 for (int i = 0; i < this->getBarrels(); i++)56 {57 //delete [] this->shootAnim[i];58 delete [] this->objComp[i];59 }60 delete [] this->emissionPoint;61 //delete [] this->shootAnim;62 delete [] this->objComp;63 64 55 } 65 56 … … 93 84 94 85 this->setBarrels(3); 95 this->setSegs(1); 96 this->activeBarrel = 0; 86 this->setSegs(1); //could be left out 97 87 98 this->objComp = new PNode**[this->getBarrels()]; 99 this->emissionPoint = new PNode*[this->getBarrels()]; 100 // this->shootAnim = new Animation3D**[this->getBarrels()]; 101 for (int i = 0; i < this->getBarrels(); i++) 102 { 103 this->objComp[i] = new PNode* [this->getSegs()]; 104 this->emissionPoint[i] = new PNode; 105 this->emissionPoint[i]->setParent(this); 106 this->emissionPoint[i]->setName("EmissionPoint"); 107 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 108 for(int j = 0; j < this->getSegs(); j++) 109 { 110 this->objComp[i][j] = new PNode; 111 // this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]); 112 // this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT); 113 } 114 } 115 116 this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1)); 117 this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05)); 118 this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05)); 88 this->setEmissionPoint(Vector(2.2, 0.0, 0.1), 0); 89 this->setEmissionPoint(Vector(2.2, -0.07, -0.05), 1); 90 this->setEmissionPoint(Vector(2.2, 0.07, -0.05), 2); 119 91 120 92 // Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this); … … 148 120 pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*180); 149 121 150 pj->setAbsCoor(this-> emissionPoint[this->activeBarrel]->getAbsCoor());122 pj->setAbsCoor(this->getEmissionPoint()); 151 123 pj->setAbsDir(this->getAbsDir()); 152 124 // pj->toList(OM_GROUP_01_PROJ); 153 125 pj->activate(); 154 126 155 // for (int i = 0; i < this->getSegs(); i++) 156 // this->shootAnim[this->activeBarrel][i]->replay(); 157 158 // switch barrel 159 this->activeBarrel = (this->activeBarrel + 1) % this->getBarrels(); 127 this->cycleBarrel(); 160 128 } 161 129
Note: See TracChangeset
for help on using the changeset viewer.