Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2006, 2:44:43 AM (18 years ago)
Author:
patrick
Message:

falling down fps player

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/creatures/fps_player.cc

    r8939 r8940  
    252252  }
    253253
     254
     255  velocity *= 100;
     256
     257
    254258  // physical falling of the player
    255 
    256 
    257 //   this->fallVelocity += 10.0f * time + this->fallVelocity;
    258 
    259 
    260   velocity *= 100;
     259  if( !this->isOnGround())
     260  {
     261    this->fallVelocity += 10.0f * time;
     262    velocity -= Vector(0.0, 1.0, 0.0) * this->fallVelocity;
     263  }
     264  else
     265  {
     266    this->fallVelocity = 0.0f;
     267  }
     268
    261269
    262270  this->shiftCoor( velocity*time );
Note: See TracChangeset for help on using the changeset viewer.