Changeset 5029 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Aug 15, 2005, 9:17:09 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/environment.cc
r4836 r5029 33 33 { 34 34 this->setClassID(CL_ENVIRONMENT, "Environment"); 35 this->model = (Model*)ResourceManager::getInstance()->load("models/ reaplow.obj"/*"worlds/vulcania.obj"*/, OBJ, RP_CAMPAIGN);35 this->model = (Model*)ResourceManager::getInstance()->load("models/bolido.obj", OBJ, RP_CAMPAIGN); 36 36 37 37 this->obbTree = new OBBTree(15, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); -
orxonox/trunk/src/world_entities/npc.cc
r4986 r5029 37 37 38 38 39 void NPC::collidesWith(WorldEntity* entity, const Vector& location) 40 { 39 41 40 /* define the reaction, if the ship is been hit */41 int NPC::hit()42 {43 die();44 return 0;45 42 } 43 46 44 47 45 void NPC::tick(float dt) … … 55 53 56 54 57 void NPC::die()58 {59 } -
orxonox/trunk/src/world_entities/npc.h
r4984 r5029 16 16 void addAI(AI* ai); 17 17 18 void tick(float dt); 19 int hit(); 20 void die(); 18 virtual void tick(float dt); 19 20 virtual void collidesWith (WorldEntity* entity, const Vector& location); 21 21 22 22 23 private: 23 /* position of the non player space craft */ 24 24 25 ; 25 26 -
orxonox/trunk/src/world_entities/world_entity.cc
r5026 r5029 103 103 void WorldEntity::collidesWith(WorldEntity* entity) 104 104 { 105 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity); 106 } 107 105 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);] 106 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName()); 107 } 108 109 110 /** 111 * this function is called, when two entities collide 112 * @param entity: the world entity with whom it collides 113 * 114 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 115 */ 116 void WorldEntity::collidesWith(WorldEntity* entity, const Vector& location) 117 { 118 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);] 119 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName()); 120 } 108 121 109 122 /** -
orxonox/trunk/src/world_entities/world_entity.h
r5026 r5029 52 52 virtual void hit (WorldEntity* weapon, Vector* loc); 53 53 virtual void collidesWith (WorldEntity* entity); 54 virtual void collidesWith (WorldEntity* entity, const Vector& location); 54 55 55 56 /** @returns the Count of Faces on this WorldEntity */
Note: See TracChangeset
for help on using the changeset viewer.