Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3279 in orxonox.OLD for orxonox/branches/old.dave/src/player.cc


Ignore:
Timestamp:
Dec 25, 2004, 3:03:04 PM (19 years ago)
Author:
dave
Message:

branches/old.dave: Die Neigung des Raumschiffes ist jetzt nicht mehr so stark, und jetzt kann man auch 2 Tasten aufs mal drücken, ohne dass das Raumschiffsche jedes mal anhält:)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/old.dave/src/player.cc

    r3172 r3279  
    2828
    2929  obj = new Object ("reaplow.obj");
     30  numPressed=0;
    3031  tottime=0.0f;
     32  numPressed=0;
    3133  movfinishright=movfinishleft=movfinishup=movfinishdown=false;
    3234  angleturn=false;
     
    9597{
    9698  //printf("Player|recieved command [%s]\n", cmd->cmd);
    97  
    98   tottime=cmd->tottime;
     99  numPressed=cmd->NumPressed;
     100 
    99101  rottime=cmd->rottime;
    100   angleturn=cmd->angleturn;
     102  if(numPressed<1){
     103        tottime=cmd->tottime;
     104        angleturn=cmd->angleturn;
     105  }
     106 
    101107 
    102108 
     
    208214  if( bDown) { accel = accel-(direction*acceleration*pow(tottime,2.0f));movfinishdown=true;tottimecopy=tottime; }
    209215  if( bLeft ) { accel = accel + (orthDirection*acceleration*pow(tottime,2.0f));
    210         if(angle>-40.0f){
    211           angle=angle-rottime*40.0f;}
     216        if(angle>-20.0f){
     217          angle=angle-rottime*20.0f;}
    212218        movfinishleft=true;
    213219        tottimecopy=tottime;}
    214220  if( bRight ) { accel = accel - (orthDirection*acceleration*pow(tottime,2.0f));
    215         if(angle<40.0f){
    216           angle=angle+rottime*40.0f;}
     221        if(angle<20.0f){
     222          angle=angle+rottime*20.0f;}
    217223          movfinishright=true;
    218224          tottimecopy=tottime;
Note: See TracChangeset for help on using the changeset viewer.