Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2006, 1:28:49 AM (17 years ago)
Author:
patrick
Message:

added the track subsystem to the buildprocess again, integrated it into the new basobject framework and commented out big regions of code because it didn't compile.
@beni: your work now can begin :D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/world_entity.cc

    r9869 r10088  
    2828
    2929#include "util/loading/load_param.h"
     30#include "loading/load_param_xml.h"
     31#include "util/loading/factory.h"
     32
    3033#include "obb_tree.h"
    3134
     
    4043#include "kill.h"
    4144#include "debug.h"
     45
     46#include "track/track.h"
    4247
    4348#include "projectiles/projectile.h"
     
    8388  this->bOnGround = false;
    8489
     90  // Track of this entity
     91  this->entityTrack = NULL;
     92
    8593  // registering default reactions:
    8694  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, /* WorldEntity::staticClassID(), */ Projectile::staticClassID());
     
    136144  .defaultValues("", 1.0f, 0);
    137145
     146  // Entity Attributes
    138147  LoadParam(root, "maxHealth", this, WorldEntity, setHealthMax)
    139148  .describe("The Maximum health that can be loaded onto this entity")
     
    145154
    146155  LoadParam(root, "list", this, WorldEntity, toListS);
     156
     157
     158  // Track
     159  LoadParamXML(root, "Track", this, WorldEntity, addTrack)
     160   .describe("creates and adds a track to this WorldEntity");
     161}
     162
     163
     164/**
     165 * this functions adds a track to this workd entity. This can be usefull, if you like this WE to follow a some waypoints.
     166 * here the track is created and further initializing left for the Track itself
     167 */
     168void WorldEntity::addTrack(const TiXmlElement* root)
     169{
     170  LOAD_PARAM_START_CYCLE(root, element);
     171  {
     172    PRINTF(4)("element is: %s\n", element->Value());
     173    Factory::fabricate(element);
     174  }
     175  LOAD_PARAM_END_CYCLE(element);
    147176}
    148177
Note: See TracChangeset for help on using the changeset viewer.