Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2006, 10:51:08 PM (18 years ago)
Author:
bensch
Message:

orxonox/branches/new_class_id: new_class ID working, adapdet many classes, and reinvented some of the ClassID stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.cc

    r9235 r9709  
    2020
    2121#include "state.h"
    22 #include "class_list.h"
    2322
    2423#include "dot_emitter.h"
     
    2726#include "debug.h"
    2827
    29 CREATE_FAST_FACTORY_STATIC(BoomerangProjectile, CL_BOOMERANG_PROJECTILE);
     28#include "class_id.h"
     29NewObjectListDefinitionID(BoomerangProjectile, CL_BOOMERANG_PROJECTILE);
     30CREATE_FAST_FACTORY_STATIC(BoomerangProjectile);
    3031
    3132/**
     
    3435BoomerangProjectile::BoomerangProjectile () : Projectile()
    3536{
    36   this->setClassID(CL_BOOMERANG_PROJECTILE, "BoomerangProjectile");
     37  this->registerObject(this, BoomerangProjectile::_objectList);
    3738
    3839  this->loadModel("models/projectiles/orx-rocket.obj", 2.0);
     
    6061
    6162  /* this is normaly done by World.cc by deleting the ParticleEngine */
    62   if (BoomerangProjectile::trailParticles != NULL && ClassList::getList(CL_BOOMERANG_PROJECTILE)->size() <= 1)
    63   {
    64     if (ClassList::exists(BoomerangProjectile::trailParticles, CL_PARTICLE_SYSTEM))
     63  if (BoomerangProjectile::trailParticles != NULL && BoomerangProjectile::objectList().size() <= 1)
     64  {
     65    if (ParticleSystem::objectList().exists(BoomerangProjectile::trailParticles))
    6566      delete BoomerangProjectile::trailParticles;
    6667    BoomerangProjectile::trailParticles = NULL;
    6768  }
    68   if (BoomerangProjectile::explosionParticles != NULL && ClassList::getList(CL_BOOMERANG_PROJECTILE)->size() <= 1)
    69   {
    70     if (ClassList::exists(BoomerangProjectile::explosionParticles, CL_PARTICLE_SYSTEM))
     69  if (BoomerangProjectile::explosionParticles != NULL && BoomerangProjectile::objectList().size() <= 1)
     70  {
     71    if (ParticleSystem::objectList().exists(BoomerangProjectile::explosionParticles))
    7172      delete BoomerangProjectile::explosionParticles;
    7273    BoomerangProjectile::explosionParticles = NULL;
Note: See TracChangeset for help on using the changeset viewer.