Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8959 in orxonox.OLD


Ignore:
Timestamp:
Jun 30, 2006, 2:54:37 PM (18 years ago)
Author:
patrick
Message:

running should work too now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/npcs/generic_npc.cc

    r8957 r8959  
    287287  anim.v = coordinate;
    288288  anim.type = Run;
     289  anim.speed = 60.0f;
    289290
    290291  if( this->behaviourList.empty())
     
    405406      case Walk:
    406407        {
    407 
    408408          Vector dest = currentAnimation.v - this->getAbsCoor();
    409409          if (dest.len() < .5)
     
    417417
    418418      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;
    420429
    421430      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;
    423441
    424442      case TurnTo:
Note: See TracChangeset for help on using the changeset viewer.