Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3755 in orxonox.OLD for orxonox/trunk/src/world_entities/player.cc


Ignore:
Timestamp:
Apr 8, 2005, 12:46:33 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: now got two weapons firing syncronized

File:
1 edited

Legend:

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

    r3752 r3755  
    5353  acceleration = 10.0;
    5454  //weapons:
    55   Weapon* wp = new TestGun(this, new Vector(-2.6, 0.1, 3.0), new Quaternion());
    56   this->weapons->add(wp);
    57   this->activeWeapon = wp; 
     55  Weapon* wpRight = new TestGun(this, new Vector(-2.6, 0.1, 3.0), new Quaternion(), 0);
     56  Weapon* wpLeft = new TestGun(this, new Vector(-2.6, 0.1, -3.0), new Quaternion(), 1);
     57  this->weapons->add(wpRight);
     58  this->activeWeapon = wpRight;
     59  this->activeWeaponL = wpLeft;
    5860}
    5961
     
    150152
    151153  this->activeWeapon->draw();
     154  this->activeWeaponL->draw();
    152155}
    153156
     
    161164  /* link tick to weapon */
    162165  this->activeWeapon->tick(time);
     166  this->activeWeaponL->tick(time); //FIX FIX DELETE REMOVE
    163167  // player controlled movement
    164168  this->move(time);
     
    206210  if( this->bFire)
    207211    {
    208       if(this->activeWeapon != NULL)
    209         this->activeWeapon->fire();
     212      //if(this->activeWeapon != NULL)
     213      this->activeWeapon->fire();
     214      //FIX THIS FIX FIIIIIIIIIIIX
     215      this->activeWeaponL->fire();
    210216    }
    211217  if( this->bWeaponChange && this->weapons->getSize() > 1)
Note: See TracChangeset for help on using the changeset viewer.