Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

less collision hacks

File:
1 edited

Legend:

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

    r10739 r10740  
    2929#include <cassert>
    3030#include "debug.h"
     31
     32#include "obb_tree.h"
    3133
    3234// #include "effects/billboard.h"
     
    6365  this->halo->setTexture("hbolt_halo2.png");
    6466  this->halo->setVisibility(false);
     67 
     68  this->obbTree = new OBBTree();
     69  this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f));
     70  this->setOBBTree(this->obbTree);
    6571
    6672}
     
    149155
    150156  this->angle += HBolt::rotationSpeed * dt;
    151 
    152   for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++)
    153   {
    154     if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    155     {
    156       (*eIterator)->destroy(this); //hit (this->getDamage(),this);
    157       this->deactivate();
    158   PRINTF(0)("HBolt destroyed\n");
    159     }
    160   }
    161157}
    162158
Note: See TracChangeset for help on using the changeset viewer.