Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/world_entities/creatures


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

Location:
trunk/src/world_entities/creatures
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/creatures/fps_player.cc

    r9494 r9869  
    3232
    3333#include "aabb.h"
    34 
     34#include "bsp_entity.h"
    3535
    3636#include "key_mapper.h"
     
    4141
    4242
    43 
    44 CREATE_FACTORY(FPSPlayer, CL_FPS_PLAYER);
     43#include "class_id_DEPRECATED.h"
     44ObjectListDefinitionID(FPSPlayer, CL_FPS_PLAYER);
     45CREATE_FACTORY(FPSPlayer);
    4546
    4647#include "script_class.h"
    47 CREATE_SCRIPTABLE_CLASS(FPSPlayer, CL_FPS_PLAYER,
    48                         addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
    49                             ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
    50                             ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
    51                             ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
     48CREATE_SCRIPTABLE_CLASS(FPSPlayer,
     49                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
     50                            ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
     51                            ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY))
     52                            ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
    5253                       );
    5354
     
    8586void FPSPlayer::init()
    8687{
    87   this->setClassID(CL_FPS_PLAYER, "FPSPlayer");
     88  this->registerObject(this, FPSPlayer::_objectList);
    8889
    8990  this->bLeft = false;
     
    166167
    167168    //subscribe to collision reaction
    168   this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, CL_BSP_ENTITY);
     169  this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity::staticClassID());
    169170
    170171  this->initWeapon = false;
  • trunk/src/world_entities/creatures/fps_player.h

    r9235 r9869  
    1616class FPSPlayer : public Playable
    1717{
     18  ObjectListDeclaration(FPSPlayer);
    1819
    1920  public:
  • trunk/src/world_entities/creatures/md2_creature.cc

    r8724 r9869  
    2222#include "objModel.h"
    2323#include "md2/md2Model.h"
    24 #include "util/loading/resource_manager.h"
    2524#include "state.h"
    2625
     
    3736#include "debug.h"
    3837
    39 CREATE_FACTORY(MD2Creature, CL_MD2_CREATURE);
     38#include "class_id_DEPRECATED.h"
     39ObjectListDefinitionID(MD2Creature, CL_MD2_CREATURE);
     40CREATE_FACTORY(MD2Creature);
    4041
    4142/**
     
    8687  PRINTF(4)("MD2CREATURE INIT\n");
    8788  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    88   this->setClassID(CL_MD2_CREATURE, "MD2Creature");
     89  this->registerObject(this, MD2Creature::_objectList);
    8990
    9091  this->toList(OM_GROUP_01);
     
    9596  Weapon* wpLeft = new TestGun(1);
    9697  wpLeft->setName("testGun Left");
    97   Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
     98  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate("Cannon"));
    9899
    99100  cannon->setName("BFG");
     
    112113  this->cameraConnNode.addChild(State::getCameraNode());
    113114  State::getCameraTargetNode()->setRelCoor(10,0,0);
    114  
     115
    115116
    116117
  • trunk/src/world_entities/creatures/md2_creature.h

    r8724 r9869  
    1616class MD2Creature : public Playable
    1717{
     18  ObjectListDeclaration(MD2Creature);
    1819
    1920  public:
Note: See TracChangeset for help on using the changeset viewer.