Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2005, 5:33:20 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: some smaller fixes, to make Weapon more local

File:
1 edited

Legend:

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

    r4910 r4927  
    6464  if( this->leftRight == W_LEFT)
    6565    {
    66       this->projectileOffset = Vector(1.0, 0.0, -0.35);
     66      this->setEmissionPoint(1.0, 0.0, -0.35);
    6767
    6868      animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     
    7878  else if( this->leftRight == W_RIGHT)
    7979    {
    80       this->projectileOffset = Vector(1.0, 0.0, 0.5);
     80      this->setEmissionPoint(1.0, 0.0, 0.5);
    8181
    8282      this->objectComponent1->setRelCoor(Vector(0,0,0.35));
     
    105105  this->setStateDuration(WS_DEACTIVATING, .4);
    106106
    107   this->energy = 100;
    108   this->minCharge = 2;
     107  this->increaseEnergy(100);
     108  //this->minCharge = 2;
    109109
    110110  this->setActionSound(WA_SHOOT, "sound/shot1.wav");
     
    156156//  weaponSource->play();
    157157
    158   pj->setAbsCoor(this->getAbsCoor() + this->projectileOffset);
     158  pj->setAbsCoor(this->getEmissionPoint());
    159159  pj->setAbsDir(this->getAbsDir());
    160160  pj->setVelocity(this->getVelocity());
Note: See TracChangeset for help on using the changeset viewer.