Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2007, 3:52:34 PM (17 years ago)
Author:
nicolasc
Message:

crosshair moves, but WM not

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/space_ships/space_ship.cc

    r10714 r10715  
    204204  this->secWeaponMan.addWeaponToSlot(0, 2, "SwarmLauncher");
    205205
     206  this->mouseSensitivity = 4;
    206207
    207208  this->weaponMan.changeWeaponConfig(0);
     
    343344  LoadParam(root, "loadWeapon", this, SpaceShip, loadWeapon)
    344345  .describe("set weapon regeneration");
     346
     347  LoadParam(root, "mouseSenitivity", this, SpaceShip, setMouseSensitivity);
    345348
    346349/*
     
    573576  else if( event.type == KeyMapper::PEV_FIRE2)
    574577    this->bSecFire = event.bPressed;
    575   else if( event.type == KeyMapper::PEV_FIRE1){
    576     printf("fireing primary");
     578  else if( event.type == KeyMapper::PEV_FIRE1)
    577579    this->bFire = event.bPressed;
    578   }
    579580  else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed)
    580581  {
     
    591592    this->yMouse += event.yRel;
    592593//     printf("Mouse Coord: %f, %f\n", this->xMouse, this->yMouse);
    593     this->weaponMan.getFixedTarget()->setRelCoor(10000, 4*xMouse, 4*yMouse);
     594    this->weaponMan.getFixedTarget()->setRelCoor(10000, -10 * this->mouseSensitivity * yMouse, 10 * this->mouseSensitivity * xMouse);
     595    this->secWeaponMan.getFixedTarget()->setRelCoor(10000, -10 * this->mouseSensitivity * yMouse, 10 * this->mouseSensitivity * xMouse);
    594596  }
    595597  else if (!(State::getCamera()->getEventHandling()))
Note: See TracChangeset for help on using the changeset viewer.