Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 24, 2007, 6:13:17 PM (17 years ago)
Author:
marcscha
Message:

SegFault prevention hack in fast factory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/mbolt.cc

    r10274 r10345  
    8181  this->trail->setTexture( "maps/laser.png");
    8282  this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
     83
    8384}
    8485
     
    107108void MBolt::activate()
    108109{
     110  this->origList = this->getOMListNumber();
    109111  this->toList(OM_ENVIRON);
    110112  if (unlikely(MBolt::explosionParticles == NULL))
     
    137139  this->lifeCycle = 0.0;
    138140
    139   this->toList(OM_DEAD);
     141  this->lifeCycle = 0.0;
     142  this->toList(OM_NULL);
     143  //this->toList(OM_DEAD);
    140144  this->removeNode();
    141145  MBolt::fastFactory->kill(this);
     
    174178  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
    175179  {
    176     if( ((*eIterator)->getOMListNumber() == OM_GROUP_00) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     180    if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
    177181    {
    178182      (*eIterator)->hit (this->getDamage(),this);
Note: See TracChangeset for help on using the changeset viewer.