Changeset 8959 in orxonox.OLD
- Timestamp:
- Jun 30, 2006, 2:54:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/npcs/generic_npc.cc
r8957 r8959 287 287 anim.v = coordinate; 288 288 anim.type = Run; 289 anim.speed = 60.0f; 289 290 290 291 if( this->behaviourList.empty()) … … 405 406 case Walk: 406 407 { 407 408 408 Vector dest = currentAnimation.v - this->getAbsCoor(); 409 409 if (dest.len() < .5) … … 417 417 418 418 case Run: 419 break; 419 { 420 Vector dest = currentAnimation.v - this->getAbsCoor(); 421 if (dest.len() < .5) 422 this->nextStep(); 423 else 424 { 425 this->shiftCoor(dest.getNormalized() * currentAnimation.speed * dt); 426 } 427 } 428 break; 420 429 421 430 case Crouch: 422 break; 431 { 432 Vector dest = currentAnimation.v - this->getAbsCoor(); 433 if (dest.len() < .5) 434 this->nextStep(); 435 else 436 { 437 this->shiftCoor(dest.getNormalized() * currentAnimation.speed * dt); 438 } 439 } 440 break; 423 441 424 442 case TurnTo:
Note: See TracChangeset
for help on using the changeset viewer.