Changeset 8914 in orxonox.OLD for branches/single_player_map/src
- Timestamp:
- Jun 29, 2006, 4:43:16 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/npcs/generic_npc.cc
r8913 r8914 284 284 * @param time: time in seconds expirded since the last tick 285 285 */ 286 void GenericNPC::tick (float time)286 void GenericNPC::tick (float dt) 287 287 { 288 288 if( likely(this->getModel(0) != NULL)) … … 295 295 { 296 296 case Walk: 297 Vector dir = this->getAbsCoor() - this->behaviourList.front().v;298 if (dir.len() < .5)299 this->nextStep();300 else301 297 { 302 this->shiftCoor(dir.normalize() * dt); 298 Vector dir = this->getAbsCoor() - this->behaviourList.front().v; 299 if (dir.len() < .5) 300 this->nextStep(); 301 else 302 { 303 this->shiftCoor(dir.getNormalized() * dt); 304 } 303 305 } 304 306 break; … … 306 308 break; 307 309 case Crouch: 310 break; 311 case TurnTo: 312 //Quaternion direction = this-> 308 313 break; 309 314 case LookAt:
Note: See TracChangeset
for help on using the changeset viewer.