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/npcs/generic_npc.cc

    r9235 r9709  
    3030#include "loading/resource_manager.h"
    3131
    32 
    33 CREATE_FACTORY(GenericNPC, CL_GENERIC_NPC);
     32#include "bsp_entity.h"
     33
     34#include "class_id.h"
     35NewObjectListDefinitionID(GenericNPC, CL_GENERIC_NPC);
     36CREATE_FACTORY(GenericNPC);
    3437
    3538#include "script_class.h"
    36 CREATE_SCRIPTABLE_CLASS(GenericNPC, CL_GENERIC_NPC,
     39CREATE_SCRIPTABLE_CLASS(GenericNPC, GenericNPC::classID(),
    3740                        // Move
    3841                        addMethod("walkTo", ExecutorLua3<GenericNPC,float,float,float>(&GenericNPC::walkTo))
     
    8184void GenericNPC::init()
    8285{
    83   this->setClassID(CL_GENERIC_NPC, "GenericNPC");
     86  this->registerObject(this, GenericNPC::_objectList);
    8487
    8588  this->toList(OM_GROUP_00);
     
    9295
    9396  // collision reaction registration
    94    this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
     97  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, BspEntity::classID());
    9598}
    9699
Note: See TracChangeset for help on using the changeset viewer.