Changeset 10648 in orxonox.OLD for branches/vs-enhencements/src/world_entities/weapons/weapon.cc
- Timestamp:
- May 4, 2007, 9:53:07 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/world_entities/weapons/weapon.cc
r10645 r10648 134 134 for(int i = 0; i < this->barrels; i++){ 135 135 this->emissionPoint[i] = new PNode; 136 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 Projectiles136 this->emissionPoint[i]->setParent(this); //Parenting emissionPoint to Weapons 137 137 this->emissionPoint[i]->setName("EmissionPoint"); 138 138 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); … … 159 159 //this->setSynchronized(true); 160 160 } 161 162 /**163 * needed, if there are more than one barrel or segments164 */165 /*166 void Weapon::init2()167 {168 if (this->barrels == 1 && this->segs == 1)169 return;170 171 delete this->emissionPoint[0];172 delete this->emissionPoint;173 delete this->shootAnim[0];174 delete this->shootAnim;175 176 this->shootAnim = new Animation3D**[this->barrels];177 this->emissionPoint = new PNode*[this->barrels];178 for(int i = 0; i < this->barrels; i++){179 this->emissionPoint[i] = new PNode;180 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 Projectiles181 this->emissionPoint[i]->setName("EmissionPoint");182 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);183 this->shootAnim[i] = new Animation3D* [this->segs];184 }185 }*/186 187 /**188 * deconstructor for init2189 */190 /*191 void Weapon::deconstr()192 {193 for(int i = 0; i < this->barrels; i++) {194 delete this->emissionPoint[i];195 for (int j = 0; j < this->segs; j++)196 delete this->shootAnim[i][j];197 delete this->shootAnim[i];198 }199 200 delete this->emissionPoint;201 delete this->shootAnim;202 }*/203 161 204 162 /**
Note: See TracChangeset
for help on using the changeset viewer.