Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6134 in orxonox.OLD for branches/objectmanager/src/world_entities


Ignore:
Timestamp:
Dec 16, 2005, 5:16:00 PM (19 years ago)
Author:
bensch
Message:

om: disected the old worldEntity list out.
removed GarbageCollector
minor updates

Location:
branches/objectmanager/src/world_entities
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/objectmanager/src/world_entities/npcs/npc.cc

    r6121 r6134  
    5050      WorldEntity* powerUp = new TurretPowerUp();
    5151      powerUp->setAbsCoor(this->getAbsCoor());
    52       State::getWorldEntityList()->add(powerUp);
     52      powerUp->toList(OM_COMMON);
    5353    }
    5454    else if ((float)rand()/RAND_MAX < .3)
     
    5656      WorldEntity* powerUp = new LaserPowerUp();
    5757      powerUp->setAbsCoor(this->getAbsCoor());
    58       State::getWorldEntityList()->add(powerUp);
     58      powerUp->toList(OM_COMMON);
    5959    }
    60     State::getWorldEntityList()->remove(this);
     60    this->toList(OM_DEAD);
    6161    this->removeNode();
    6262
     
    6868  {
    6969    this->setVisibiliy(false);
    70     State::getWorldEntityList()->remove(this);
     70    this->toList(OM_DEAD);
    7171    this->removeNode();
    7272  }
  • branches/objectmanager/src/world_entities/power_ups/laser_power_up.cc

    r5994 r6134  
    8080 // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
    8181 if (entity->isA(CL_PLAYABLE))
    82   State::getWorldEntityList()->remove(this);
     82  this->toList(OM_DEAD);
    8383}
    8484
  • branches/objectmanager/src/world_entities/power_ups/turret_power_up.cc

    r5994 r6134  
    8080 // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
    8181 if (entity->isA(CL_PLAYABLE))
    82   State::getWorldEntityList()->remove(this);
     82   this->toList(OM_DEAD);
    8383}
    8484
  • branches/objectmanager/src/world_entities/test_entity.cc

    r6122 r6134  
    7171    PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z);
    7272  this->setVisibiliy(false);
    73   State::getWorldEntityList()->remove(this);
     73  this->toList(OM_DEAD);
    7474  }
    7575}
  • branches/objectmanager/src/world_entities/weapons/aim.cc

    r6078 r6134  
    104104void Aim::searchTarget(float range)
    105105{
    106   tIterator<WorldEntity>* iterator = State::getWorldEntityList()->getIterator();
     106  //FIXME//
     107/*  tIterator<WorldEntity>* iterator = State::getWorldEntityList()->getIterator();
    107108  WorldEntity* entity = iterator->firstElement();
    108109  while (likely(entity != NULL))
     
    121122  }
    122123
    123   delete iterator;
     124  delete iterator;*/
    124125}
    125126
  • branches/objectmanager/src/world_entities/weapons/bomb.cc

    r6123 r6134  
    174174void Bomb::activate()
    175175{
    176   State::getWorldEntityList()->add(this);
    177176
    178177}
     
    180179void Bomb::deactivate()
    181180{
    182   this->toList(OM_NULL);
    183   State::getWorldEntityList()->remove(this);
     181  this->toList(OM_DEAD);
    184182  this->lifeCycle = 0.0f;
    185183  Bomb::fastFactory->kill(this);
  • branches/objectmanager/src/world_entities/weapons/guided_missile.cc

    r6126 r6134  
    8585void GuidedMissile::activate()
    8686{
    87   State::getWorldEntityList()->add(this);
    8887  if (unlikely(GuidedMissile::trailParticles == NULL))
    8988  {
     
    129128  this->lifeCycle = 0.0;
    130129
    131   this->toList(OM_NULL);
    132 //  GarbageCollector::getInstance()->collect(this);
    133   State::getWorldEntityList()->remove(this);
     130  this->toList(OM_DEAD);
    134131  this->removeNode();
    135132  GuidedMissile::fastFactory->kill(this);
  • branches/objectmanager/src/world_entities/weapons/laser.cc

    r6123 r6134  
    7777void Laser::activate()
    7878{
    79   State::getWorldEntityList()->add(this);
    8079  if (unlikely(Laser::explosionParticles == NULL))
    8180  {
     
    9998  this->toList(OM_NULL);
    10099
    101   State::getWorldEntityList()->remove(this);
     100  this->toList(OM_DEAD);
    102101  this->removeNode();
    103102  Laser::fastFactory->kill(this);
  • branches/objectmanager/src/world_entities/weapons/projectile.cc

    r6078 r6134  
    2222#include "weapon.h"
    2323#include "model.h"
    24 
    25 #include "garbage_collector.h"
    2624
    2725using namespace std;
  • branches/objectmanager/src/world_entities/weapons/rocket.cc

    r6123 r6134  
    8282void Rocket::activate()
    8383{
    84   State::getWorldEntityList()->add(this);
    8584  if (unlikely(Rocket::trailParticles == NULL))
    8685  {
     
    128127
    129128//  GarbageCollector::getInstance()->collect(this);
    130   State::getWorldEntityList()->remove(this);
     129  this->toList(OM_DEAD);
    131130  Rocket::fastFactory->kill(this);
    132131}
  • branches/objectmanager/src/world_entities/weapons/test_bullet.cc

    r6123 r6134  
    8282void TestBullet::activate()
    8383{
    84   State::getWorldEntityList()->add(this);
    8584  if (unlikely(TestBullet::trailParticles == NULL))
    8685  {
     
    121120  this->toList(OM_NULL);
    122121
    123 //  GarbageCollector::getInstance()->collect(this);
    124   State::getWorldEntityList()->remove(this);
    125122  TestBullet::fastFactory->kill(this);
    126123}
Note: See TracChangeset for help on using the changeset viewer.