Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 2, 2006, 1:36:13 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the single_player_map branche back
merged with command:
svn merge -r8896:HEAD https://svn.orxonox.net/orxonox/branches/single_player_map .
no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/creatures/fps_player.cc

    r8894 r9003  
    8383  this->bBackward = false;
    8484  this->bJump = false;
     85  this->bPosBut = false;
    8586
    8687  this->xMouse = 0.0f;
     
    9091  this->setHealth(80);
    9192
     93  this->fallVelocity = 0.0f;
    9294
    9395  this->cameraNode.setParent(this);
     
    121123
    122124  this->getWeaponManager().setSlotCount(2);
    123   this->getWeaponManager().setSlotPosition(0, Vector(0.0, 5.0, 0.0));
    124   this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(0,1,0)));
     125  this->getWeaponManager().setSlotPosition(0, Vector(1.5, -0.7, 1.1));
     126//   this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_2, Vector(0,1,0)));
    125127  this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
    126   this->getWeaponManager().setSlotPosition(1, Vector(-0.5, .2, 1.9));
     128  this->getWeaponManager().setSlotPosition(1, Vector(5.0, 0.0, 0.0));
    127129  this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(1,0,0)));
    128130
     
    205207void FPSPlayer::tick (float time)
    206208{
     209 
     210  if( this->bPosBut)
     211  {
     212    this->bPosBut = false;
     213    printf("prisoner:walkTo( %f, height, %f)\n",this->getAbsCoorX(),this->getAbsCoorZ());
     214  }
     215 
    207216  Playable::tick( time );
    208217
     
    251260  }
    252261
     262
    253263  velocity *= 100;
    254264
     265
     266  // physical falling of the player
     267  if( !this->isOnGround())
     268  {
     269    this->fallVelocity += 300.0f * time;
     270    velocity -= Vector(0.0, 1.0, 0.0) * this->fallVelocity;
     271  }
     272  else
     273  {
     274    this->fallVelocity = 0.0f;
     275  }
     276
     277
    255278  this->shiftCoor( velocity*time );
     279
     280
     281
    256282
    257283
     
    321347  }
    322348  else if( event.type == KeyMapper::PEV_JUMP)
    323     this->getAbsCoor().debug();
    324 }
    325 
    326 
    327 
    328 
     349    this->bPosBut = event.bPressed;
     350}
     351
     352
     353
     354
Note: See TracChangeset for help on using the changeset viewer.