Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 4, 2007, 9:53:07 AM (17 years ago)
Author:
nicolasc
Message:

some additional weapons, started weapons cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vs-enhencements/src/world_entities/weapons/weapon.cc

    r10645 r10648  
    134134  for(int i = 0; i < this->barrels; i++){
    135135    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 Projectiles
     136    this->emissionPoint[i]->setParent(this);  //Parenting emissionPoint to Weapons
    137137    this->emissionPoint[i]->setName("EmissionPoint");
    138138    this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
     
    159159  //this->setSynchronized(true);
    160160}
    161 
    162 /**
    163  * needed, if there are more than one barrel or segments
    164  */
    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 Projectiles
    181     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 init2
    189  */
    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 }*/
    203161
    204162/**
Note: See TracChangeset for help on using the changeset viewer.