Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10545 in orxonox.OLD for trunk/src/world_entities/projectiles


Ignore:
Timestamp:
Jan 31, 2007, 5:39:05 AM (17 years ago)
Author:
marcscha
Message:

pirate explosion fix

Location:
trunk/src/world_entities/projectiles
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/projectiles/hbolt.cc

    r10511 r10545  
    2020#include "state.h"
    2121#include "model.h"
     22#include "world_entities/npcs/npc.h"
    2223
    2324#include "particles/dot_emitter.h"
     
    147148  this->angle += this->rotationSpeed * dt;
    148149
    149   for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     150  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
    150151  {
    151     if( ((*eIterator)->getOMListNumber() != (this->origList -1))   && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     152    if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    152153    {
    153       (*eIterator)->hit (this->getDamage(),this);
     154      (*eIterator)->destroy(this); //hit (this->getDamage(),this);
    154155      this->deactivate();
    155156  PRINTF(0)("HBolt destroyed\n");
  • trunk/src/world_entities/projectiles/lbolt.cc

    r10511 r10545  
    2222#include "state.h"
    2323#include "model.h"
     24
     25#include "world_entities/npcs/npc.h"
    2426
    2527#include "particles/dot_emitter.h"
     
    148150  angle += rotationSpeed * dt;
    149151
    150   for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     152  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
    151153  {
    152     if( ((*eIterator)->getOMListNumber() != (this->origList -1))   && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     154    if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    153155    {
    154       (*eIterator)->hit (this->getDamage(),this);
     156      (*eIterator)->destroy(this); //hit (this->getDamage(),this);
    155157      this->deactivate();
    156158  PRINTF(0)("LBolt destroyed\n");
  • trunk/src/world_entities/projectiles/mbolt.cc

    r10420 r10545  
    2222#include "state.h"
    2323#include "model.h"
     24
     25#include "world_entities/npcs/npc.h"
    2426
    2527#include "particles/dot_emitter.h"
     
    176178  this->trail->tick(dt);
    177179
    178   for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     180  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
    179181  {
    180182    if( ((*eIterator)->getOMListNumber() != (this->origList -1))  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    181183    {
    182       (*eIterator)->hit (this->getDamage(),this);
     184      (*eIterator)->destroy(this); //hit (this->getDamage(),this);
    183185      this->deactivate();
    184186      PRINTF(0)("MBolt destroyed\n");
  • trunk/src/world_entities/projectiles/swarm_projectile.cc

    r10539 r10545  
    224224  this->curDir = this->velocity;
    225225
    226   if( this->target != NULL && (this->getAbsCoor() - this->target->getAbsCoor()).len() < 3)   // FIXME  Temp fake workaround for collision :)
     226  if( this->target != NULL && (this->getAbsCoor() - this->target->getAbsCoor()).len() < 3)   // HACK  Temp fake workaround for collision :)
    227227  {
    228228    dynamic_cast<WorldEntity*>(target)->destroy(this); //hit(this->getDamage(), this);
Note: See TracChangeset for help on using the changeset viewer.