- Timestamp:
- Jun 27, 2006, 12:48:57 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/npcs/generic_npc.cc
r8815 r8816 148 148 149 149 // check if this is the current goal 150 if( this->destCoor != destCoor &&this->destDir != destDir)150 if( this->destCoor != destCoor || this->destDir != destDir) 151 151 { 152 152 this->destCoor = destCoor; … … 159 159 160 160 this->currentAnim = new Animation3D(this); 161 this->currentAnim->addKeyFrame(this->getAbsCoor(), this->getAbsDir(), 0.0f); 162 this->currentAnim->addKeyFrame(this->destCoor, this->destDir, time); 161 this->currentAnim->addKeyFrame(this->getAbsCoor(), this->getAbsDir(), 0.1f, ANIM_LINEAR, ANIM_LINEAR); 162 this->currentAnim->addKeyFrame(this->destCoor, this->destDir, time, ANIM_LINEAR, ANIM_LINEAR); 163 164 this->currentAnim->setInfinity(ANIM_INF_CONSTANT); 165 this->currentAnim->play(); 163 166 164 167 this->setAnimation(RUN, MD2_ANIM_LOOP); … … 183 186 { 184 187 Quaternion q = this->getAbsDir(); 185 188 186 189 printf("%s moving to %f, %f, %f \n",this->getName(),x,y,z); 187 190 … … 336 339 if( likely(this->getModel(0) != NULL)) 337 340 ((InteractiveModel*)this->getModel(0))->tick(time); 341 342 // tick this animation 343 if( this->currentAnim != NULL) 344 this->currentAnim->tick(time); 338 345 } 339 346
Note: See TracChangeset
for help on using the changeset viewer.