Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 4, 2007, 12:13:53 PM (18 years ago)
Author:
bknecht
Message:

merged cleanup into trunk (only improvements)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1616OrxonoxPlayability.kdevses
        1717OrxonoxPlayability.kdevelop.pcs
         18orxonox.backtrace
         19orxonox.kdevses
         20orxonox.kdevelop.pcs
  • trunk/src/world_entities/weapons/light_blaster.cc

    r10539 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "light_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
     
    3955  for (int i = 0; i < this->getBarrels(); i++)
    4056  {
    41    delete [] this->shootAnim[i];
     57   //delete [] this->shootAnim[i];
    4258   delete [] this->objComp[i];
    4359  }
    4460  delete [] this->emissionPoint;
    45    delete [] this->shootAnim;
     61   //delete [] this->shootAnim;
    4662   delete [] this->objComp;
    4763
     
    8298  this->objComp = new PNode**[this->getBarrels()];
    8399  this->emissionPoint = new PNode*[this->getBarrels()];
    84   this->shootAnim = new Animation3D**[this->getBarrels()];
     100//   this->shootAnim = new Animation3D**[this->getBarrels()];
    85101  for (int i = 0; i < this->getBarrels(); i++)
    86102  {
    87103    this->objComp[i] = new PNode* [this->getSegs()];
    88104    this->emissionPoint[i] = new PNode;
    89     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
     105    this->emissionPoint[i]->setParent(this);
    90106    this->emissionPoint[i]->setName("EmissionPoint");
    91107    this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
    92     this->shootAnim[i] = new Animation3D* [this->getSegs()];
     108//     this->shootAnim[i] = new Animation3D* [this->getSegs()];
    93109    for(int j = 0; j < this->getSegs(); j++)
    94110    {
    95111      this->objComp[i][j] = new PNode;
    96       this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);
    97       this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);
     112//       this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);
     113//       this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);
    98114    }
    99115  }
    100 
    101   for (int i = 0; i < this->getBarrels(); i++ )
    102     this->emissionPoint[i]->setRelCoor(Vector(1.19, 0.0, 0.1));
     116/*
     117  this->emissionPoint[0]->setRelCoor(Vector(1.19, 0.0, 0.1));
     118  this->emissionPoint[1]->setRelCoor(Vector(1.19, -0.07, -0.05));
     119  this->emissionPoint[2]->setRelCoor(Vector(1.19, 0.07, -0.05));*/
     120
     121  this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1));
     122  this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05));
     123  this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05));
    103124
    104125//   Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this);
     
    112133//   this->setEmissionPoint(3.8, 1.2, 0);
    113134
    114   for (int i = 0; i < this->getBarrels(); i++){
    115     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);
    116     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);
    117   }
     135//   for (int i = 0; i < this->getBarrels(); i++){
     136//     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);
     137//     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);
     138//   }
    118139
    119140
     
    144165  pj->activate();
    145166
    146   for (int i = 0; i < this->getSegs(); i++)
    147     this->shootAnim[this->activeBarrel][i]->replay();
     167//   for (int i = 0; i < this->getSegs(); i++)
     168//     this->shootAnim[this->activeBarrel][i]->replay();
    148169
    149170  // switch barrel
Note: See TracChangeset for help on using the changeset viewer.