Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5029 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Aug 15, 2005, 9:17:09 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: some changes in the NPC interface class

Location:
orxonox/trunk/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/environment.cc

    r4836 r5029  
    3333{
    3434  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);
    3636
    3737  this->obbTree = new OBBTree(15, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
  • orxonox/trunk/src/world_entities/npc.cc

    r4986 r5029  
    3737
    3838
     39void NPC::collidesWith(WorldEntity* entity, const Vector& location)
     40{
    3941
    40 /* define the reaction, if the ship is been hit */
    41 int NPC::hit()
    42 {
    43   die();
    44   return 0;
    4542}
     43
    4644
    4745void NPC::tick(float dt)
     
    5553
    5654
    57 void NPC::die()
    58 {
    59 }
  • orxonox/trunk/src/world_entities/npc.h

    r4984 r5029  
    1616  void addAI(AI* ai);
    1717
    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
    2122
    2223 private:
    23   /* position of the non player space craft */
     24
    2425;
    2526
  • orxonox/trunk/src/world_entities/world_entity.cc

    r5026 r5029  
    103103void WorldEntity::collidesWith(WorldEntity* entity)
    104104{
    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 */
     116void 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}
    108121
    109122/**
  • orxonox/trunk/src/world_entities/world_entity.h

    r5026 r5029  
    5252  virtual void hit (WorldEntity* weapon, Vector* loc);
    5353  virtual void collidesWith (WorldEntity* entity);
     54  virtual void collidesWith (WorldEntity* entity, const Vector& location);
    5455
    5556  /** @returns the Count of Faces on this WorldEntity */
Note: See TracChangeset for help on using the changeset viewer.