Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8940 in orxonox.OLD


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

falling down fps player

Location:
branches/single_player_map/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r8938 r8940  
    121121        {
    122122          entity->shiftCoor(Vector(0.0f, -height, 0.0f));
     123//           entity->setOnGround(true);
    123124        }
    124125        // object is already in the wall
     
    126127        {
    127128          entity->setAbsCoor(entity->getLastAbsCoor());
     129        }
     130        else
     131        {
     132          // entity is not on ground
     133//           entity->setOnGround(false);
    128134        }
    129135        break;
  • 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 );
  • branches/single_player_map/src/world_entities/world_entity.cc

    r8898 r8940  
    8282    this->collisionHandles[i] = NULL;
    8383  this->bReactive = false;
     84  this->bOnGround = false;
    8485
    8586  // registering default reactions:
Note: See TracChangeset for help on using the changeset viewer.