Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 20, 2005, 5:39:13 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: added some droids in the middle of the track to the left side. They die on shooting. Bensch: have some fun :D

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npc.cc

    r5065 r5087  
    3030  this->setClassID(CL_NPC, "NPC");
    3131
    32   this->loadModelWithScale("models/ships/bolido.obj",5);
     32  this->loadModelWithScale("models/ships/bolido.obj", 5);
    3333
    3434  this->randomRotAxis = VECTOR_RAND(1);
  • trunk/src/world_entities/test_entity.cc

    r5085 r5087  
    2222#include "md2Model.h"
    2323#include "obb_tree.h"
     24#include "state.h"
     25#include "list.h"
    2426
    2527using namespace std;
     
    3133  this->setClassID(CL_TEST_ENTITY, "TestEntity");
    3234
     35  this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx");
    3336//   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);
    3639
    37   this->md2Model->setAnim(STAND);
     40  this->md2Model->setAnim(RUN);
    3841  this->md2Model->debug();
    3942}
     
    5760}
    5861
     62
     63void 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}
    5972
    6073void TestEntity::hit (WorldEntity* weapon, Vector* loc) {}
  • trunk/src/world_entities/test_entity.h

    r4488 r5087  
    2525  virtual void destroy ();
    2626  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
     27  virtual void collidesWith(WorldEntity* entity, const Vector& location);
    2728  virtual void draw ();
    2829
Note: See TracChangeset for help on using the changeset viewer.