Changeset 10326 in orxonox.OLD
- Timestamp:
- Jan 24, 2007, 11:32:13 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/creatures/fps_player.cc
r10321 r10326 166 166 this->initWeapon = false; 167 167 this->damageTicker = 0.0f; 168 168 169 } 169 170 … … 241 242 242 243 243 if( this->aimingSystem != NULL)244 {245 this->aimingSystem->toList(OM_GROUP_01);246 this->aimingSystem->setParent(&this->cameraNode);247 // this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE);248 this->aimingSystem->setRelDir(Quaternion(M_PI_4*-0.58f, Vector(0,0,1)));249 this->aimingSystem->setRelCoor(0, -1, -1);250 }244 // if( this->aimingSystem != NULL) 245 // { 246 // this->aimingSystem->toList(OM_GROUP_01); 247 // this->aimingSystem->setParent(&this->cameraNode); 248 // // this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE); 249 // this->aimingSystem->setRelDir(Quaternion(M_PI_4*-0.58f, Vector(0,0,1))); 250 // this->aimingSystem->setRelCoor(0, -1, -1); 251 // } 251 252 252 253 … … 341 342 velocity *= 100; 342 343 343 if( this-> bJump && likely(this->getModel(0) != NULL))344 { 345 if( this-> jumpForce < 1.0f)344 if( this->getModel( 0) != NULL) 345 { 346 if( this->bJump) 346 347 { 347 this->jumpForce = 300.0f; 348 349 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP) 350 ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP); 348 if( this->jumpForce < 1.0f) 349 { 350 this->jumpForce = 300.0f; 351 352 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP) 353 ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP); 354 } 351 355 } 352 }353 else if(velocity.len() != 0.0f)354 {355 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != RUN)356 ((InteractiveModel*)this->getModel(0))->setAnimation(RUN);357 }358 else359 {360 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)361 ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);356 else if(velocity.len() != 0.0f) 357 { 358 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != RUN) 359 ((InteractiveModel*)this->getModel(0))->setAnimation(RUN); 360 } 361 else 362 { 363 if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND) 364 ((InteractiveModel*)this->getModel(0))->setAnimation(STAND); 365 } 362 366 } 363 367 … … 395 399 396 400 this->setOnGround(false); 397 this->aimingSystem->flushList(); 401 if( this->aimingSystem != NULL) 402 this->aimingSystem->flushList(); 398 403 } 399 404
Note: See TracChangeset
for help on using the changeset viewer.