Changeset 6054 in orxonox.OLD for trunk/src/world_entities/npcs/npc_test.cc
- Timestamp:
- Dec 11, 2005, 6:23:42 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/npc_test.cc
r6004 r6054 58 58 59 59 60 void NPC2::collidesWith(WorldEntity* entity, const Vector& location)61 {62 if (entity->isA(CL_PROJECTILE))63 {64 PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z);65 this->applyForce(Vector(0,0,0)-location*1000);66 }67 else if (entity->isA(CL_PLAYER))68 this->applyForce(Vector(0,0,0)-location*100);69 else70 {71 this->setVisibiliy(false);72 State::getWorldEntityList()->remove(this);73 }74 }75 76 60 77 61 /**
Note: See TracChangeset
for help on using the changeset viewer.