Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Sep 25, 2005, 6:27:22 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: real strange, i thought i fixed this before
this seems to be a copy-past error

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

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

    r5213 r5256  
    3636  this->model = (Model*)ResourceManager::getInstance()->load("models/ships/bolido.obj", OBJ, RP_CAMPAIGN);
    3737
    38 /*  if(this->obbTree == NULL)
    39     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());*/
     38  if(this->obbTree == NULL)
     39    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    4040}
    4141
  • trunk/src/world_entities/test_entity.cc

    r5213 r5256  
    3636//   this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx");
    3737// 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);
     38  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
    3939
    4040  this->md2Model->setAnim(RUN);
  • trunk/src/world_entities/world_entity.cc

    r5213 r5256  
    9999bool WorldEntity::buildObbTree(unsigned int depth)
    100100{
    101 //   if (this->obbTree)
    102 //     delete this->obbTree;
    103 //
    104 //   if (this->model)
    105 //   {
    106 //     PRINTF(4)("creating obb tree\n");
    107 //     this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
    108 //     return true;
    109 //   }
    110 //   else
    111 //   {
    112 //     PRINTF(2)("could not create obb-tree, because no model was loaded yet\n");
    113 //     this->obbTree = NULL;
    114 //     return false;
    115 //  }
     101  if (this->obbTree)
     102    delete this->obbTree;
     103
     104  if (this->model)
     105  {
     106    PRINTF(4)("creating obb tree\n");
     107    this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
     108    return true;
     109  }
     110  else
     111  {
     112    PRINTF(2)("could not create obb-tree, because no model was loaded yet\n");
     113    this->obbTree = NULL;
     114    return false;
     115  }
    116116}
    117117
Note: See TracChangeset for help on using the changeset viewer.