Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9757 in orxonox.OLD for branches/new_class_id/src/world_entities


Ignore:
Timestamp:
Sep 18, 2006, 10:06:19 PM (18 years ago)
Author:
bensch
Message:

new_class_id: hups… this was bad naming… confusing too.

Location:
branches/new_class_id/src/world_entities
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/world_entities/creatures/fps_player.cc

    r9746 r9757  
    4646
    4747#include "script_class.h"
    48 CREATE_SCRIPTABLE_CLASS(FPSPlayer, FPSPlayer::classID(),
     48CREATE_SCRIPTABLE_CLASS(FPSPlayer,
    4949                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
    5050                            ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
     
    167167
    168168    //subscribe to collision reaction
    169   this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity::classID());
     169  this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity::staticClassID());
    170170
    171171  this->initWeapon = false;
  • branches/new_class_id/src/world_entities/environments/mapped_water.cc

    r9746 r9757  
    3232SHELL_COMMAND(output, MappedWater, saveParams);
    3333
    34 CREATE_SCRIPTABLE_CLASS(MappedWater, MappedWater::classID(),
     34CREATE_SCRIPTABLE_CLASS(MappedWater,
    3535                        addMethod("waterUV", Executor2<MappedWater, lua_State*, float, float>(&MappedWater::fadeWaterUV))
    3636                        ->addMethod("waterFlow", Executor2<MappedWater, lua_State*, float, float>(&MappedWater::fadeWaterFlow))
  • branches/new_class_id/src/world_entities/npcs/attractor_mine.cc

    r9746 r9757  
    3737CREATE_FACTORY(AttractorMine);
    3838#include "script_class.h"
    39 CREATE_SCRIPTABLE_CLASS(AttractorMine, AttractorMine::classID(),
     39CREATE_SCRIPTABLE_CLASS(AttractorMine,
    4040                        addMethod("setName", Executor1<BaseObject, lua_State*,const std::string&>(&BaseObject::setName))
    4141                        //Coordinates
  • branches/new_class_id/src/world_entities/npcs/gate.cc

    r9746 r9757  
    3737
    3838#include "script_class.h"
    39 CREATE_SCRIPTABLE_CLASS(Gate, Gate::classID(),
     39CREATE_SCRIPTABLE_CLASS(Gate,
    4040                        addMethod("hide", Executor0<WorldEntity, lua_State*>(&WorldEntity::hide))
    4141                            ->addMethod("unhide", Executor0<WorldEntity, lua_State*>(&WorldEntity::unhide))
  • branches/new_class_id/src/world_entities/npcs/generic_npc.cc

    r9746 r9757  
    3737
    3838#include "script_class.h"
    39 CREATE_SCRIPTABLE_CLASS(GenericNPC, GenericNPC::classID(),
     39CREATE_SCRIPTABLE_CLASS(GenericNPC,
    4040                        // Move
    4141                        addMethod("walkTo", Executor3<GenericNPC, lua_State*,float,float,float>(&GenericNPC::walkTo))
     
    9595
    9696  // collision reaction registration
    97   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, BspEntity::classID());
     97  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, BspEntity::staticClassID());
    9898}
    9999
  • branches/new_class_id/src/world_entities/playable.cc

    r9715 r9757  
    110110{
    111111  /// FIXME TOTALLY
    112   if(powerUp->isA(WeaponPowerUp::classID()))
     112  if(powerUp->isA(WeaponPowerUp::staticClassID()))
    113113  {
    114114    return static_cast<WeaponPowerUp*>(powerUp)->process(&this->getWeaponManager());
    115115  }
    116   else if(powerUp->isA(ParamPowerUp::classID()))
     116  else if(powerUp->isA(ParamPowerUp::staticClassID()))
    117117  {
    118118    ParamPowerUp* ppu = static_cast<ParamPowerUp*>(powerUp);
  • branches/new_class_id/src/world_entities/power_ups/power_up.cc

    r9727 r9757  
    122122void PowerUp::collidesWith (WorldEntity* entity, const Vector& location)
    123123{
    124   if(this->collider != entity && entity->isA(Extendable::classID()))
     124  if(this->collider != entity && entity->isA(Extendable::staticClassID()))
    125125  {
    126126    this->collider = entity;
  • branches/new_class_id/src/world_entities/script_trigger.cc

    r9746 r9757  
    2222ObjectListDefinition(ScriptTrigger);
    2323
    24 CREATE_SCRIPTABLE_CLASS(ScriptTrigger, ScriptTrigger::classID(),
     24CREATE_SCRIPTABLE_CLASS(ScriptTrigger,
    2525            // Coordinates
    2626                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
  • branches/new_class_id/src/world_entities/space_ships/helicopter.cc

    r9746 r9757  
    3838CREATE_FACTORY(Helicopter);
    3939#include "script_class.h"
    40 CREATE_SCRIPTABLE_CLASS(Helicopter, Helicopter::classID(),
     40CREATE_SCRIPTABLE_CLASS(Helicopter,
    4141                        addMethod("moveUp", Executor1<Helicopter, lua_State*,bool>(&Helicopter::moveUp))
    4242                            ->addMethod("moveDown", Executor1<Helicopter, lua_State*,bool>(&Helicopter::moveDown))
  • branches/new_class_id/src/world_entities/space_ships/hover.cc

    r9746 r9757  
    3939
    4040#include "script_class.h"
    41 CREATE_SCRIPTABLE_CLASS(Hover, Hover::classID(),
     41CREATE_SCRIPTABLE_CLASS(Hover,
    4242                        addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer))
    4343                        //Coordinates
  • branches/new_class_id/src/world_entities/space_ships/space_ship.cc

    r9746 r9757  
    5858
    5959#include "script_class.h"
    60 CREATE_SCRIPTABLE_CLASS(SpaceShip, SpaceShip::classID(),
     60CREATE_SCRIPTABLE_CLASS(SpaceShip,
    6161                        addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer))
    6262                        ->addMethod("fire", Executor1<Playable, lua_State*, bool>(&Playable::fire))
  • branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.cc

    r9746 r9757  
    4242CREATE_FACTORY(Spacecraft2D);
    4343
    44 CREATE_SCRIPTABLE_CLASS(Spacecraft2D, Spacecraft2D::classID(),
     44CREATE_SCRIPTABLE_CLASS(Spacecraft2D,
    4545                        addMethod("hasPlayer", Executor0ret<Playable, lua_State*,bool>(&Playable::hasPlayer))
    4646                        //Coordinates
  • branches/new_class_id/src/world_entities/test_entity.cc

    r9746 r9757  
    4040
    4141#include "script_class.h"
    42 CREATE_SCRIPTABLE_CLASS(TestEntity, TestEntity::classID(),
     42CREATE_SCRIPTABLE_CLASS(TestEntity,
    4343                        addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor))
    4444                        ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX))
  • branches/new_class_id/src/world_entities/weapons/aiming_system.cc

    r9727 r9757  
    6262  // registering default reactions:
    6363  this->unsubscribeReaction(CREngine::CR_OBJECT_DAMAGE);
    64   this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, WorldEntity::classID());
     64  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, WorldEntity::staticClassID());
    6565
    6666  this->range = 1000.0f;
  • branches/new_class_id/src/world_entities/weapons/weapon.cc

    r9723 r9757  
    7777  if (createdObject != NULL)
    7878  {
    79     if (createdObject->isA(Weapon::classID()))
     79    if (createdObject->isA(Weapon::staticClassID()))
    8080      return dynamic_cast<Weapon*>(createdObject);
    8181    else
     
    9393  if (createdObject != NULL)
    9494  {
    95     if (createdObject->isA(Weapon::classID()))
     95    if (createdObject->isA(Weapon::staticClassID()))
    9696      return dynamic_cast<Weapon*>(createdObject);
    9797    else
     
    131131  this->defaultTarget = NULL;                      //< Nothing is Targeted by default.
    132132
    133   this->projectile = NullClass::classID();         //< No Projectile Class is Connected to this weapon
     133  this->projectile = NullClass::staticClassID();         //< No Projectile Class is Connected to this weapon
    134134  this->projectileFactory = NULL;                  //< No Factory generating Projectiles is selected.
    135135
  • branches/new_class_id/src/world_entities/weapons/weapon_manager.cc

    r9755 r9757  
    298298  {
    299299    this->parentNode->addChild(weapon);
    300     if (this->parentEntity->isA(Playable::classID()))
     300    if (this->parentEntity->isA(Playable::staticClassID()))
    301301      dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
    302302    weapon->setDefaultTarget(this->crosshair);
     
    468468      else
    469469        this->currentSlotConfig[i].position.deactivateNode();
    470       if (this->parentEntity != NULL && this->parentEntity->isA(Playable::classID()))
     470      if (this->parentEntity != NULL && this->parentEntity->isA(Playable::staticClassID()))
    471471        dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged();
    472472    }
Note: See TracChangeset for help on using the changeset viewer.