Changeset 5087 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Aug 20, 2005, 5:39:13 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npc.cc
r5065 r5087 30 30 this->setClassID(CL_NPC, "NPC"); 31 31 32 this->loadModelWithScale("models/ships/bolido.obj", 5);32 this->loadModelWithScale("models/ships/bolido.obj", 5); 33 33 34 34 this->randomRotAxis = VECTOR_RAND(1); -
trunk/src/world_entities/test_entity.cc
r5085 r5087 22 22 #include "md2Model.h" 23 23 #include "obb_tree.h" 24 #include "state.h" 25 #include "list.h" 24 26 25 27 using namespace std; … … 31 33 this->setClassID(CL_TEST_ENTITY, "TestEntity"); 32 34 35 this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx"); 33 36 // this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx"); 34 this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp");35 this->obbTree = new OBBTree( 15, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);37 // this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp"); 38 this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices); 36 39 37 this->md2Model->setAnim( STAND);40 this->md2Model->setAnim(RUN); 38 41 this->md2Model->debug(); 39 42 } … … 57 60 } 58 61 62 63 void TestEntity::collidesWith(WorldEntity* entity, const Vector& location) 64 { 65 if (entity->isA(CL_PROJECTILE)) 66 { 67 PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z); 68 this->setVisibiliy(false); 69 State::getWorldEntityList()->remove(this); 70 } 71 } 59 72 60 73 void TestEntity::hit (WorldEntity* weapon, Vector* loc) {} -
trunk/src/world_entities/test_entity.h
r4488 r5087 25 25 virtual void destroy (); 26 26 virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); 27 virtual void collidesWith(WorldEntity* entity, const Vector& location); 27 28 virtual void draw (); 28 29
Note: See TracChangeset
for help on using the changeset viewer.