Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 27, 2007, 7:01:08 PM (17 years ago)
Author:
nicolasc
Message:

huge diff
cleaned the individual weapons, moved stuff to weapon.{cc,h}
and some minor fixes which popped up then and when

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/nadion_laser.cc

    r10763 r10771  
    5454NadionLaser::~NadionLaser()
    5555{
    56   // model will be deleted from WorldEntity-destructor
    57   for (int i = 0; i < this->getBarrels(); i++)
    58   {
    59    delete [] this->shootAnim[i];
    60   }
    61   delete [] this->shootAnim;
    6256}
    6357
     
    9286
    9387
    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
    9790
    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());
    11892
    11993  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
     
    143117
    144118  Vector dir = (this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor()).getNormalized();
     119  //FIXME direction calculation is a mess, needs to be cleaned up
    145120  // HACK direction AbsDir calulation
    146121  Vector up = dir.cross(VECTOR_RAND(1));
Note: See TracChangeset for help on using the changeset viewer.