Changeset 9105 in orxonox.OLD for branches/presentation
- Timestamp:
- Jul 4, 2006, 5:16:29 AM (19 years ago)
- Location:
- branches/presentation/src/world_entities/creatures
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/creatures/fps_player.cc
r9104 r9105 97 97 98 98 this->fallVelocity = 0.0f; 99 this->jumpForce = 0.0f; 99 100 100 101 this->cameraNode.setParent(this); … … 273 274 if( this->bJump && likely(this->getModel(0) != NULL)) 274 275 { 275 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP) 276 ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP); 276 if( this->jumpForce < 1.0f) 277 { 278 this->jumpForce = 300.0f; 279 280 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP) 281 ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP); 282 } 277 283 } 278 284 else if(velocity.len() != 0.0f) … … 287 293 } 288 294 295 296 velocity.y += this->jumpForce; 297 if( this->jumpForce > 1.0f) 298 this->jumpForce *= 0.9f; 289 299 290 300 -
branches/presentation/src/world_entities/creatures/fps_player.h
r9003 r9105 54 54 55 55 float fallVelocity; //!< velocity for falling down 56 float jumpForce; //!< the jump force 56 57 }; 57 58
Note: See TracChangeset
for help on using the changeset viewer.