Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3888 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc


Ignore:
Timestamp:
Apr 19, 2005, 1:16:16 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: deconstructor cleanup in weapon/gun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3886 r3888  
    4747  this->leftRight = leftRight;
    4848
    49   if( this->leftRight == 0)
    50     this->projOffset = new Vector(1.0, 0.0, -0.35);
    51   else if( this->leftRight == 1)
    52     this->projOffset = new Vector(1.0, 0.0, 0.5);
    53 
    54 
    55   //this->dummy1 = new WorldEntity(); // a world entity that is not drawed: use this for the weapon
    5649  this->objectComponent1 = new PNode();
    5750  this->animation1 = new Animation3D(this->objectComponent1);
    58 
    5951  parent->addChild(this->objectComponent1, PNODE_ALL);
    6052
     
    6355  if( this->leftRight == W_LEFT)
    6456    {
     57      this->projectileOffset = Vector(1.0, 0.0, -0.35);
     58
    6559      this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);
    6660      this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);
     
    6963  else if( this->leftRight == W_RIGHT)
    7064    {
     65      this->projectileOffset = Vector(1.0, 0.0, 0.5);
     66
    7167      this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);
    7268      this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR);
     
    119115      return;
    120116    }
     117
    121118  Projectile* pj = new TestBullet(this);
    122 
    123   pj->setAbsCoor(this->getAbsCoor() + *this->projOffset);
     119  pj->setAbsCoor(this->getAbsCoor() + this->projectileOffset);
    124120  pj->setAbsDir(this->getAbsDir());
    125 
    126121  pj->setFlightDirection(this->getAbsDir());
    127122  pj->setSpeed(this->getSpeed());
    128 
    129123  this->worldEntities->add(pj);
    130124  this->localTime = 0;
Note: See TracChangeset for help on using the changeset viewer.