Changeset 10771 in orxonox.OLD for branches/presentation/src/world_entities/weapons/nadion_laser.cc
- Timestamp:
- Jun 27, 2007, 7:01:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/nadion_laser.cc
r10763 r10771 54 54 NadionLaser::~NadionLaser() 55 55 { 56 // model will be deleted from WorldEntity-destructor57 for (int i = 0; i < this->getBarrels(); i++)58 {59 delete [] this->shootAnim[i];60 }61 delete [] this->shootAnim;62 56 } 63 57 … … 92 86 93 87 94 this->setBarrels(1); 95 this->setSegs(1); 96 this->activeBarrel = 0; 88 this->setBarrels(1); // could be left out 89 this->setSegs(1); // could be left out 97 90 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); //Parenting emissionPoint to Weapon 106 this->emissionPoint[i]->setName("EmissionPoint"); 107 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 108 this->shootAnim[i] = new Animation3D* [this->getSegs()]; 109 for(int j = 0; j < this->getSegs(); j++) 110 { 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); 114 } 115 } 116 117 this->emissionPoint[0]->setRelCoor(Vector(1.680, 0.0, 0.0) * this->getScaling()); 91 this->setEmissionPoint(Vector(1.680, 0.0, 0.0) * this->getScaling()); 118 92 119 93 Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this); … … 143 117 144 118 Vector dir = (this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor()).getNormalized(); 119 //FIXME direction calculation is a mess, needs to be cleaned up 145 120 // HACK direction AbsDir calulation 146 121 Vector up = dir.cross(VECTOR_RAND(1));
Note: See TracChangeset
for help on using the changeset viewer.