Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 392


Ignore:
Timestamp:
Dec 5, 2007, 2:53:26 PM (17 years ago)
Author:
mbiber
Message:

fixed a bug in spaceship_steering.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/spaceship_steering.cc

    r379 r392  
    1 #include "OgreSceneNode.h"
     1#include "Ogre.h"
    22#include "spaceship_steering.h"
    33using namespace Ogre;
     
    6767    if(speedRotateUpDown_ < 0)
    6868      speedRotateUpDown_ += accelerationRotateUpDown_*time;
     69    if(abs(speedRotateUpDown_)<accelerationRotateUpDown_*time)
     70      speedRotateUpDown_ = 0;
    6971  }
    7072
     
    8991    if(speedRotateRightLeft_ < 0)
    9092      speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
     93    if(abs(speedRotateRightLeft_)<accelerationRotateRightLeft_*time)
     94      speedRotateRightLeft_ = 0;
    9195  }
    9296
     
    111115    if(speedLoopRightLeft_ < 0)
    112116      speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
     117    if(abs(speedLoopRightLeft_)<accelerationLoopRightLeft_*time)
     118      speedLoopRightLeft_ = 0;
    113119  }
    114120
Note: See TracChangeset for help on using the changeset viewer.