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/mbolt.cc

    r10698 r10740  
    3636
    3737#include "effects/trail.h"
     38
     39#include "obb_tree.h"
    3840
    3941
     
    8486//   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
    8587  this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7);
     88 
     89  this->obbTree = new OBBTree();
     90  this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f));
     91  this->setOBBTree(this->obbTree);
    8692
    8793}
     
    178184  this->angle += MBolt::rotationSpeed * dt;
    179185  this->trail->tick(dt);
    180 
    181   for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
    182   {
    183     if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    184     {
    185       (*eIterator)->destroy(this); //hit (this->getDamage(),this);
    186       this->deactivate();
    187       PRINTF(0)("MBolt destroyed\n");
    188     }
    189   }
    190186}
    191187
Note: See TracChangeset for help on using the changeset viewer.