Changeset 5257 in orxonox.OLD for trunk/src/world_entities/npc.cc
- Timestamp:
- Sep 25, 2005, 7:04:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npc.cc
r5087 r5257 43 43 if (entity->isA(CL_PROJECTILE)) 44 44 PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z); 45 this->setVisibiliy(false); 46 State::getWorldEntityList()->remove(this); 45 this->applyForce(Vector(0,0,0)-location*1000); 46 // this->setVisibiliy(false); 47 // State::getWorldEntityList()->remove(this); 47 48 } 48 49 … … 50 51 void NPC::tick(float dt) 51 52 { 52 Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor());53 // Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor()); 53 54 54 55 //if (directin.len() < 100) 55 this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0));56 // this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0)); 56 57 this->shiftDir(Quaternion(dt, this->randomRotAxis)); 57 58
Note: See TracChangeset
for help on using the changeset viewer.