Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2006, 1:23:25 PM (18 years ago)
Author:
bensch
Message:

segfault preverter

File:
1 edited

Legend:

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

    r8831 r8847  
    408408bool GenericNPC::turnTo(float qu, float qx, float qy, float qz)
    409409{
    410   Quaternion destDir = Quaternion(Vector(qx, qy, qz), qu);
     410  Quaternion destDir = Quaternion(Vector(qx, qy, qz).getNormalized(), qu);
    411411
    412412  printf("Turning: %f, %f, %f, %f \n",qu,qx,qy,qz);
     
    418418//     if( this->currentAnim != NULL)
    419419//       this->currentAnim->stop();
    420 //     
     420//
    421421    PRINTF(0)("SET ANIMATION\n");
    422422    this->destDir = destDir;
    423 // 
    424    
    425    
     423//
     424
     425
    426426    if( this->currentAnim != NULL)
    427427      delete this->currentAnim;
    428    
     428
    429429    this->setAbsDir(destDir);
    430430/*
     
    437437    this->currentAnim->setInfinity(ANIM_INF_CONSTANT);
    438438    this->currentAnim->play();*/
    439    
     439
    440440    this->setAnimation(STAND, MD2_ANIM_LOOP);
    441441  }
Note: See TracChangeset for help on using the changeset viewer.