Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4979 in orxonox.OLD for orxonox/trunk/src/util/garbage_collector.cc


Ignore:
Timestamp:
Aug 10, 2005, 4:47:23 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: Objects now get cleanly ereased.
This is a fix in the Weapon-class, that kills the Resurected Projectiles created for information-gathering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/garbage_collector.cc

    r4975 r4979  
    2525
    2626using namespace std;
    27 
    2827
    2928GarbageCollector* GarbageCollector::singletonRef = 0;
     
    119118void GarbageCollector::update()
    120119{
    121   if (this->time < this->delay)
    122   {
    123     return;
    124   }
    125   if (this->collectedObjects == NULL)
     120  if (this->time < this->delay || this->collectedObjects == NULL)
    126121    return;
    127122  else
     
    131126    while (tmpC != NULL)
    132127    {
    133       WorldEntity* entity = dynamic_cast<WorldEntity*>(tmpC->objectPointer);
     128      //WorldEntity* entity = dynamic_cast<WorldEntity*>(tmpC->objectPointer);
    134129      //State::getWorldEntityList()->remove(entity);
    135       entity->remove();
    136       FastFactory::kill(entity, true);
     130      //entity->remove();
     131      FastFactory::kill(tmpC->objectPointer, true);
    137132
    138133      moveC = tmpC->next;
Note: See TracChangeset for help on using the changeset viewer.