Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2007, 8:00:41 PM (17 years ago)
Author:
rennerc
Message:

less collision hacks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/projectiles/lbolt.cc

    r10698 r10740  
    3131#include <cassert>
    3232#include "debug.h"
     33
     34#include "obb_tree.h"
    3335
    3436#include "space_ships/space_ship.h"
     
    6769  this->halo->setPulse();
    6870
     71   
     72  this->obbTree = new OBBTree();
     73  this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f));
     74  this->setOBBTree(this->obbTree);
    6975}
    7076
     
    151157  if(angle > 360)
    152158    angle -= 360;
    153 
    154   for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
    155   {
    156     if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    157     {
    158       (*eIterator)->destroy(this); //hit (this->getDamage(),this);
    159       this->deactivate();
    160   PRINTF(0)("LBolt destroyed\n");
    161     }
    162   }
    163159}
    164160
Note: See TracChangeset for help on using the changeset viewer.