Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10114 in orxonox.OLD for trunk


Ignore:
Timestamp:
Dec 19, 2006, 11:55:26 PM (18 years ago)
Author:
patrick
Message:

merged network back to trunk

Location:
trunk/src
Files:
1 deleted
109 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r9869 r10114  
    5959                defs/globals.h \
    6060                defs/compiler.h \
    61                 defs/class_id_DEPRECATED.h \
    6261                subprojects/benchmark.h
    6362
  • trunk/src/lib/graphics/importer/md2/md2Model.cc

    r9869 r10114  
    9292  rebuildInfo();
    9393
    94   //this->debug();
     94  this->debug();
    9595}
    9696
     
    9999{
    100100  this->init();
     101
     102  this->scaleFactor = model.scaleFactor;
     103
    101104  this->rebuildInfo();
    102105}
     
    104107MD2Model& MD2Model::operator=(const MD2Model& md2model)
    105108{
     109  this->init();
     110  this->scaleFactor = md2model.scaleFactor;
    106111  this->data = md2model.data;
    107112  this->rebuildInfo();
     
    141146  this->data = MD2Data::Pointer(new MD2Data(modelFileName, skinFileName, scale));
    142147  this->rebuildInfo();
     148
     149  // init the animation - do not remove
     150  this->tick( 0.01);
     151
     152  return true;
    143153}
    144154
     
    268278/**
    269279 * @brief draws the model: interface for all other classes out in the world
    270  * @todo make it const and virtual
    271  * FIXME
    272280 */
    273281void MD2Model::draw() const
     
    313321      glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]);
    314322      glVertex3fv(this->verticesList[pCommands[2]]);
     323//       printf("vertex: %f, %f, %f\n", this->verticesList[pCommands[2]][0], this->verticesList[pCommands[2]][1], this->verticesList[pCommands[2]][2]);
    315324    }
    316325    glEnd();
     
    325334{
    326335  //static sVec3D this->verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
    327   int* pCommands = this->data->pGLCommands;
     336  //  int* pCommands = this->data->pGLCommands;
    328337  /* some face culling stuff */
    329338  //   glPushAttrib(GL_POLYGON_BIT);
     
    428437  PRINT(0)("=  Number of Frames: \t%i\n", this->data->header->numFrames);
    429438  PRINT(0)("=  Height, Width:\t%i, %i\n", this->data->header->skinHeight, this->data->header->skinWidth);
    430   //PRINT(0)("=  Pointer to the data object: %p\n", this->data);
     439  PRINT(0)("=  DATA:\n");
     440  PRINT(0)("=  Number of references to data: %i\n", this->data.count());
    431441  PRINT(0)("===================================================\n\n");
    432442}
     
    452462  this->loadModel(modelFileName);
    453463  this->loadSkin(skinFileName);
     464
     465  PRINTF(0)("model %s, skin %s\n", modelFileName.c_str(), skinFileName.c_str());
    454466}
    455467
     
    570582  delete [] buffer;
    571583  fclose(pFile);
     584
     585  return true;
    572586}
    573587
     
    592606  this->material.setIllum(3);
    593607  this->material.setAmbient(1.0, 1.0, 1.0);
    594 }
     608
     609  return true;
     610}
  • trunk/src/lib/graphics/importer/md2/resource_md2.cc

    r9869 r10114  
    2020    PRINTF(0)("NOT FOUND MD2: %s\n", modelName.c_str());
    2121    std::string modelFileName = this->Resource::locateFile(modelName);
    22     //std::string skinFileName = this->Resource::locateFile(skinName);
     22    std::string skinFileName = this->Resource::locateFile(skinName);
     23    PRINTF(0)("NEW %s::%s\n", modelName.c_str(), modelFileName.c_str());
    2324    this->MD2Model::load(modelFileName, skinName, scale);
    24     this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), keepLevel, this->MD2Model::dataPointer()));
     25    this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinFileName, scale), keepLevel, this->MD2Model::dataPointer()));
    2526  }
    2627
  • trunk/src/lib/graphics/light.cc

    r9869 r10114  
    2626#include "debug.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 
    30 ObjectListDefinitionID(Light, CL_LIGHT);
     28ObjectListDefinition(Light);
    3129CREATE_FACTORY(Light);
    3230
  • trunk/src/lib/graphics/render2D/image_plane.cc

    r9869 r10114  
    2323#include "p_node.h"
    2424
    25 
    26 #include "class_id_DEPRECATED.h"
    27 
    28 ObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE);
     25ObjectListDefinition(ImagePlane);
    2926CREATE_FACTORY(ImagePlane);
    3027
  • trunk/src/lib/graphics/shader_data.cc

    r9869 r10114  
    6363  {
    6464    PRINTF(2)("Shaders are not supported on your hardware\n");
    65   }
     65    return true;
     66  }
     67 
     68  return true;
    6669}
    6770
  • trunk/src/lib/graphics/text_engine/limited_width_text.cc

    r9869 r10114  
    3333  this->setLineWidth(lineWidth);
    3434}
     35
    3536
    3637/**
  • trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc

    r9869 r10114  
    2626#include "debug.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
     28ObjectListDefinition(GLMenuImageScreen);
    3029CREATE_FACTORY(GLMenuImageScreen);
    3130
  • trunk/src/lib/lang/base_object.cc

    r9869 r10114  
    3535}
    3636
     37/**
     38 * copyconstructor
     39 * @param bo instance to copy
     40 */
     41BaseObject::BaseObject( const BaseObject& bo )
     42{
     43  this->className = "BaseObject";
     44  this->objectName = bo.objectName;
     45  this->xmlElem = (bo.xmlElem)? bo.xmlElem->Clone() : NULL;
     46  this->registerObject( this, BaseObject::_objectList);
     47}
     48
     49
    3750/**
    3851 * @brief standard deconstructor
     
    4558  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
    4659  {
    47     if (ORX_DEBUG >= 5)
     60    //if (ORX_DEBUG >= 5)
    4861      assert((*it)._objectList->checkIteratorInList((*it)._iterator) || (*it)._objectList->checkObjectInList(this));
    4962    (*it)._objectList->unregisterObject((*it)._iterator);
  • trunk/src/lib/lang/base_object.h

    r9869 r10114  
    3030public:
    3131  BaseObject (const std::string& objectName = "");
     32  BaseObject( const BaseObject& bo );
    3233
    3334  virtual ~BaseObject ();
     
    5152  /** @returns the ClassID of this Object */
    5253  inline const ClassID& getClassID() const { return _classes.front()._objectList->identity(); }
    53   /** @returns the ID of the Topmost object of the ClassStack */
    54   inline const int& getLeafClassID() const { return _classes.front()._objectList->identity().id(); }
    5554
    5655  bool isA(const ObjectListBase& objectList) const;
  • trunk/src/lib/lang/object_list.cc

    r9869 r10114  
    2525 * @return a new NewObejctList
    2626 */
    27 ObjectListBase::ObjectListBase(const std::string& className, int id)
     27ObjectListBase::ObjectListBase(const std::string& className)
    2828    : _name(className)
    2929{
     
    3636  assert(!ObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)");
    3737
    38   if (id == -1)
    39   {
    40     id = ObjectListBase::_classesByID->size();
    41     // searching for a free ID
    42     while (ObjectListBase::classIDExists(id)) ++id;
    43   }
     38  int id = ObjectListBase::_classesByID->size();
     39  // searching for a free ID
     40  while (ObjectListBase::classIDExists(id)) ++id;
     41
    4442  assert(!ObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)");
    4543
     
    330328    return -1;
    331329}
     330
     331
     332/**
     333 * replace all ids. list must contain all (and no more) ids
     334 * @param str2id list: string -> newId
     335 */
     336void ObjectListBase::replaceIDMap( const std::map< std::string, int >& str2id )
     337{
     338  if ( str2id.size() != _classesByID->size() )
     339  {
     340    assert( false && "size of str2id does not match" );
     341  }
     342
     343  IDMap * map = new IDMap();
     344
     345  std::map< std::string, int >::const_iterator it;
     346  for ( it = str2id.begin(); it != str2id.end(); it++ )
     347  {
     348    assert( _classesByName->find( it->first ) != _classesByName->end() );
     349    (*map)[ it->second ] =  (*_classesByName)[it->first];
     350    (*map)[ it->second ]->_id = it->second;
     351  }
     352
     353  delete _classesByID;
     354  _classesByID = map;
     355}
     356
     357/**
     358 *
     359 * @return
     360 */
     361std::map< std::string, int > * ObjectListBase::createStrToId( )
     362{
     363  std::map< std::string, int > * res = new std::map< std::string, int >();
     364
     365  NameMap::const_iterator it;
     366  for ( it = _classesByName->begin(); it != _classesByName->end(); it++ )
     367  {
     368    IDMap::const_iterator it2;
     369    int id = -1;
     370    for ( it2 = _classesByID->begin(); it2 != _classesByID->end(); it2++ )
     371    {
     372      if ( it->second == it2->second )
     373      {
     374        id = it2->first;
     375        break;
     376      }
     377    }
     378
     379    assert( id != -1 );
     380    (*res)[ it->first ] = id;
     381  }
     382
     383  return res;
     384}
  • trunk/src/lib/lang/object_list.h

    r9869 r10114  
    3232 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
    3333 * @param ClassName: the Name of the Class.
    34  * @param ID: optional set a Fixed ID.
    35  */
    36 #define ObjectListDefinitionID(ClassName, ID) \
    37    ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
    38 
    39 /**
    40  * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
    41  * @param ClassName: the Name of the Class.
    4234 */
    4335#define ObjectListDefinition(ClassName) \
    44     ObjectListDefinitionID(ClassName, -1)
     36    ObjectList<ClassName> ClassName::_objectList(#ClassName)
    4537
    4638class BaseObject;
     
    109101
    110102protected:
    111   ObjectListBase(const std::string& className, int id = -1);
     103  ObjectListBase(const std::string& className);
    112104  virtual ~ObjectListBase();
    113105
     
    133125  static NameMap*               _classesByName;     //!< A Map of all the classes in existance.
    134126  static std::list<std::string> _classNames;        //!< A list of all the registered ClassNames.
     127
     128public:
     129  static void replaceIDMap( const std::map<std::string, int>& str2id );
     130  static std::map<std::string, int>* createStrToId();
    135131};
    136132
     
    199195
    200196public:
    201   ObjectList(const std::string& name, int id = -1);
     197  ObjectList(const std::string& name);
    202198  ~ObjectList();
    203199
     
    256252 */
    257253template <class T>
    258 ObjectList<T>::ObjectList(const std::string& name, int id)
    259     : ObjectListBase(name, id)
     254ObjectList<T>::ObjectList(const std::string& name)
     255    : ObjectListBase(name)
    260256{}
    261257
  • trunk/src/lib/network/Makefile.am

    r9656 r10114  
    4343                      synchronizeable_var/synchronizeable_uint.cc \
    4444                      synchronizeable_var/synchronizeable_ip.cc \
     45                      synchronizeable_var/synchronizeable_classid.cc \
     46                      synchronizeable_var/synchronizeable_classid_list.cc \
    4547                      \
    4648                      ip.cc
     
    9496                synchronizeable_var/synchronizeable_uint.h \
    9597                synchronizeable_var/synchronizeable_ip.h \
     98                synchronizeable_var/synchronizeable_classid.h \
     99                synchronizeable_var/synchronizeable_classid_list.h \
    96100                \
    97101                ip.h
  • trunk/src/lib/network/handshake.cc

    r9869 r10114  
    2222#include "debug.h"
    2323
     24#include "synchronizeable_var/synchronizeable_classid_list.h"
     25
     26std::map< std::string, int >* Handshake::classIdList = NULL;
    2427
    2528ObjectListDefinition(Handshake);
     
    3235  this->registerObject(this, Handshake::_objectList);
    3336
     37  if ( !Handshake::classIdList )
     38  {
     39    //TODO who else?
     40    if ( SharedNetworkData::getInstance()->isMasterServer() )
     41    {
     42      Handshake::classIdList = ObjectListBase::createStrToId();
     43    }
     44    else
     45    {
     46      Handshake::classIdList = new std::map< std::string, int >();
     47    }
     48  }
    3449
    3550  // register all variable handlers
     
    5267  registerVar( new SynchronizeableIP( &this->proxy2, &this->proxy2, "proxy server 2", PERMISSION_MASTER_SERVER ) );
    5368  registerVar( new SynchronizeableInt( &this->redirectProxy, &this->redirectProxy, "proxy server redirection flag", PERMISSION_MASTER_SERVER ) );
     69 
     70  registerVar( new SynchronizeableClassIDList( Handshake::classIdList, Handshake::classIdList, "classId List", PERMISSION_MASTER_SERVER ) );
    5471
    5572
  • trunk/src/lib/network/handshake.h

    r9869 r10114  
    113113    int                errorString_handler;                   //!< handshake error string handler
    114114    int                candel_id;                             //!< handshake deletion handler
    115     int                nodeType;                              //!, the type of the network node
     115    int                nodeType;                              //!< the type of the network node
    116116
    117117    int                redirectProxy;                         //!< true if the client should reconnect to a proxy server
    118118    IP                 proxy1;                               //!< ip address of the first proxy (0.0.0.0 of not available)
    119119    IP                 proxy2;                               //!< ip address of the second proxy (0.0.0.0 of not available)
     120   
     121    static std::map< std::string, int >* classIdList;
     122  public:
     123    std::map< std::string, int >* getClassIdList(){ return classIdList; }
    120124};
    121125
  • trunk/src/lib/network/message_manager.cc

    r9869 r10114  
    242242    assert( i + messageLength <= length );
    243243    // make sure there is a message handler for this message type
     244    //if ( !( messageHandlerMap.find( (MessageType)messageType ) != messageHandlerMap.end()) )
     245    //{
     246//          PRINTF(0)("messagetype: %d\n", messageType);
     247//          this->objectList().debugAll( 0 );
     248//    }
     249   
    244250    assert( messageHandlerMap.find( (MessageType)messageType ) != messageHandlerMap.end());
    245251
  • trunk/src/lib/network/network_game_manager.cc

    r9869 r10114  
    111111  playable.loadMD2Texture( playableTexture );
    112112  playable.setTeam(team);
    113   playable.loadModel( playableModel, 100.0f );
     113  playable.loadModel( playableModel, playableScale );
    114114  playable.setOwner( userId );
    115115  playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
  • trunk/src/lib/network/network_stream.cc

    r9869 r10114  
    128128
    129129  this->bRedirect = false;
     130  this->bSoftRedirect = false;
    130131
    131132  this->currentState = 0;
     
    716717              // init the new message manager
    717718              MessageManager::getInstance()->setUniqueID( it->second.handshake->getMessageManagerId() );
     719              ObjectListBase::replaceIDMap( *(it->second.handshake->getClassIdList()) );
    718720            }
    719721
     
    966968
    967969      // if handshake not finished only sync handshake
    968       if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID())
     970      if ( peer->second.handshake && Handshake::staticClassID() != sync.getClassID() )
    969971        continue;
    970972
     
    972974      if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
    973975             SharedNetworkData::getInstance()->isProxyServerActive() &&  peer->second.isClient())
    974              && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
     976             && Handshake::staticClassID() == sync.getClassID() && sync.getUniqueID() != peer->second.userId )
    975977        continue;
    976978
    977979      /* list of synchronizeables that will never be synchronized over the network: */
    978980      // do not sync null parent
    979       if ( NullParent::staticClassID() == sync.getLeafClassID())
     981      if ( NullParent::staticClassID() == sync.getClassID())
    980982        continue;
    981983
    982984
    983       assert( sync.getLeafClassID() != 0);
     985      assert( sync.getClassID() != 0);
    984986
    985987      assert( offset + INTSIZE <= UDP_PACKET_SIZE );
     
    11881190          if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId)
    11891191          {
    1190             PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
     1192            PRINTF(0)("Don't create Object with ID %d, ignored!\n", (int)leafClassId);
    11911193            offset += syncDataLength;
    11921194            continue;
    11931195          }
    11941196          else
    1195             ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId );
    1196 
     1197                  b = Factory::fabricate( ObjectListBase::retrieveIdentity( leafClassId ) );
     1198         
    11971199          if ( !b )
    11981200          {
    1199             PRINTF(1)("Could not fabricate Object with classID %x\n", leafClassId);
     1201            PRINTF(1)("Could not fabricate Object with classID %d\n", leafClassId);
    12001202            offset += syncDataLength;
    12011203            continue;
     
    12081210            sync->setSynchronized(true);
    12091211
    1210             PRINTF(0)("Fabricated %s with id %d\n", sync->getClassCName(), sync->getUniqueID());
     1212            PRINTF(1)("Fabricated %s with id %d\n", sync->getClassCName(), sync->getUniqueID());
    12111213          }
    12121214          else
    12131215          {
    1214             PRINTF(1)("Class with ID %x is not a synchronizeable!\n", (int)leafClassId);
     1216            PRINTF(1)("Class with ID %d is not a synchronizeable!\n", (int)leafClassId);
    12151217            delete b;
    12161218            offset += syncDataLength;
  • trunk/src/lib/network/peer_info.h

    r9656 r10114  
    3636    int                 userId;                  //!< id of this network node
    3737    int                 nodeType;                //!< type of this network node
    38     IP                  ip;                      //!> the ip address of this network node
     38    IP                  ip;                      //!< the ip address of this network node
    3939
    4040    NetworkSocket *     socket;                  //!< socket connecting to this node
  • trunk/src/lib/network/player_stats.cc

    r9869 r10114  
    3030#include "shell_command.h"
    3131
    32 #include "class_id_DEPRECATED.h"
    33 
    34 ObjectListDefinitionID(PlayerStats, CL_PLAYER_STATS);
     32
     33
     34ObjectListDefinition(PlayerStats);
    3535CREATE_FACTORY(PlayerStats);
    3636
  • trunk/src/lib/network/synchronizeable.cc

    r9869 r10114  
    3030
    3131#include "converter.h"
     32
     33#include "synchronizeable_var/synchronizeable_classid.h"
    3234
    3335
     
    5658  /* make sure loadClassId is first synced var because this is read by networkStream */
    5759  assert( syncVarList.size() == 0 );
    58   mLeafClassId = this->registerVarId( new SynchronizeableInt( (int*)&this->getLeafClassID(), (int*)&this->getLeafClassID(), "leafClassId", PERMISSION_MASTER_SERVER) );
     60  assert( this->getClassID() == this->objectList().id() );
     61 
     62  mLeafClassId = this->registerVarId( new SynchronizeableClassID( this, "leafClassId", PERMISSION_MASTER_SERVER) );
    5963
    6064  this->registerVar( new SynchronizeableInt( &this->owner, &this->owner, "owner", PERMISSION_MASTER_SERVER ) );
     
    267271//       PRINTF(0)("sending %s %d\n", (*it)->getName().c_str(), n);
    268272
    269 //       if( this->isA(CL_PLAYABLE))
     273//       if( this->isA( Playable::staticClassID() ))
    270274//       {
    271275//         PRINTF(0)("ms: %i, ps: %i, c: %i, sender: %i, reciever: %i, owner: %i, perm: (ow %i, ms %i, s %i, a %i)\n",
     
    453457      //(*it)->debug();
    454458
    455 //       if( this->isA(CL_PLAYABLE))
     459//       if( this->isA(Playable::staticClassID()))
    456460//       {
    457461//         PRINTF(0)("ms: %i, ps: %i, c: %i, sender: %i, reciever: %i, owner: %i, perm: (ow %i, ms %i, s %i, a %i)\n",
  • trunk/src/lib/physics/fields/gravity.cc

    r9869 r10114  
    2121#include "util/loading/factory.h"
    2222
    23 #include "class_id_DEPRECATED.h"
    24 ObjectListDefinitionID(Gravity, CL_FIELD_GRAVITY);
     23
     24ObjectListDefinition(Gravity);
    2525
    2626CREATE_FACTORY(Gravity);
  • trunk/src/lib/physics/fields/point_gravity.cc

    r9869 r10114  
    2020
    2121
    22 #include "class_id_DEPRECATED.h"
    23 ObjectListDefinitionID(PointGravity, CL_FIELD_POINT_GRAVITY);
     22
     23ObjectListDefinition(PointGravity);
    2424
    2525
  • trunk/src/lib/physics/fields/twirl.cc

    r9869 r10114  
    2020
    2121
    22 #include "class_id_DEPRECATED.h"
    23 ObjectListDefinitionID(Twirl, CL_FIELD_TWIRL);
     22
     23ObjectListDefinition(Twirl);
    2424
    2525
  • trunk/src/lib/physics/physics_connection.cc

    r9869 r10114  
    2828#include "util/loading/load_param.h"
    2929
    30 #include "class_id_DEPRECATED.h"
     30
    3131ObjectListDefinition(PhysicsConnection);
    3232CREATE_FACTORY(PhysicsConnection);
  • trunk/src/orxonox.cc

    r10015 r10114  
    8787#ifndef __WIN32__
    8888REGISTER_ARG_FLAG( _, write_bt_to_file, "misc", "bt-to-file", "Write backtrace to file", "1");
     89REGISTER_ARG_FLAG( _, dont_catch_signals, "misc", "bt-to-file", "Write backtrace to file", "0");
    8990#endif
    9091
  • trunk/src/story_entities/menu/game_menu.cc

    r9869 r10114  
    4141#include "parser/preferences/preferences.h"
    4242
    43 #include "class_id_DEPRECATED.h"
     43
    4444//! This creates a Factory to fabricate a GameMenu
    45 ObjectListDefinitionID(GameMenu, CL_GAME_MENU);
     45ObjectListDefinition(GameMenu);
    4646CREATE_FACTORY(GameMenu);
    4747
  • trunk/src/story_entities/movie_loader.cc

    r9869 r10114  
    2525
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(MovieLoader, CL_MOVIE_LOADER);
     27
     28ObjectListDefinition(MovieLoader);
    2929CREATE_FACTORY(MovieLoader);
    3030
  • trunk/src/story_entities/multi_player_world.cc

    r9869 r10114  
    3636SHELL_COMMAND(debug, MultiPlayerWorld, debug);
    3737
    38 #include "class_id_DEPRECATED.h"
     38
    3939//! This creates a Factory to fabricate a MultiPlayerWorld
    40 ObjectListDefinitionID(MultiPlayerWorld, CL_MULTI_PLAYER_WORLD);
     40ObjectListDefinition(MultiPlayerWorld);
    4141CREATE_FACTORY(MultiPlayerWorld);
    4242
  • trunk/src/story_entities/multi_player_world_data.cc

    r9869 r10114  
    149149        BaseObject* created = Factory::fabricate(element);
    150150        if( created != NULL )
    151           PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassCName(), created->getCName(), created->getLeafClassID(), element->Value());
     151          PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassCName(), created->getCName(), (int)created->getClassID().id(), element->Value());
    152152        else
    153153          PRINTF(1)("NetworkWorld: could not create this entity\n");
     
    180180
    181181          if( created != NULL )
    182             PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassCName(), created->getCName(), created->getLeafClassID(), element->Value());
     182            PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassCName(), created->getCName(), created->getClassID().id(), element->Value());
    183183          else
    184184            PRINTF(1)("NetworkWorld: could not create this entity\n");
  • trunk/src/story_entities/single_player_world.cc

    r9869 r10114  
    3030
    3131
    32 #include "class_id_DEPRECATED.h"
     32
    3333//! This creates a Factory to fabricate a SinglePlayerWorld
    34 ObjectListDefinitionID(SinglePlayerWorld, CL_SINGLE_PLAYER_WORLD);
     34ObjectListDefinition(SinglePlayerWorld);
    3535CREATE_FACTORY(SinglePlayerWorld);
    3636
  • trunk/src/subprojects/network/simple_sync.cc

    r9869 r10114  
    2222#include "simple_sync.h"
    2323
    24 #include "class_id_DEPRECATED.h"
     24
    2525#include "loading/fast_factory.h"
    2626#include "lib/util/loading/factory.h"
  • trunk/src/util/game_rules.cc

    r9869 r10114  
    6565    PRINTF(4)("Adding Mission Goal:%s\n", element->Value());
    6666    BaseObject* created = Factory::fabricate(element);
    67     if (created != NULL /*&& created->isA(CL_GAME_RULES)*/)
     67    if (created != NULL /*&& created->isA(GameRules::staticClassID())*/)
    6868    {
    6969      MissionGoal* mg = dynamic_cast<MissionGoal*>(created);
  • trunk/src/util/kill_target.cc

    r9869 r10114  
    2222
    2323
    24 #include "class_id_DEPRECATED.h"
    25 ObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
     24
     25ObjectListDefinition(KillTarget);
    2626CREATE_FACTORY(KillTarget);
    2727
  • trunk/src/util/multiplayer_team_deathmatch.cc

    r9869 r10114  
    4646#include "spawning_point.h"
    4747
    48 
    49 
    50 #include "class_id_DEPRECATED.h"
    51 
    52 ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
     48#include "creatures/fps_player.h"
     49
     50ObjectListDefinition(MultiplayerTeamDeathmatch);
    5351CREATE_FACTORY(MultiplayerTeamDeathmatch);
    5452/**
     
    148146      box->setAbsCoor2D( 300, 100 );
    149147
    150       if( SharedNetworkData::getInstance()->isClient() ||  SharedNetworkData::getInstance()->isProxyServerActive())
    151       {
    152         OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator");
    153         box->pack( buttonSpectator );
    154         buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator);
    155 
    156         OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random");
    157         box->pack( buttonRandom );
    158         buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom);
    159 
    160         OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team");
    161         box->pack( buttonTeam0 );
    162         buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0);
    163 
    164         OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team");
    165         box->pack( buttonTeam1 );
    166         buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1);
    167       }
    168       else
    169       {
    170         OrxGui::GLGuiText* text = new OrxGui::GLGuiText();
    171         text->setText("Server Mode: not able to play at this node");
    172         box->pack( text);
    173       }
    174 
     148      OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator");
     149      box->pack( buttonSpectator );
     150      buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator);
     151
     152      OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random");
     153      box->pack( buttonRandom );
     154      buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom);
     155
     156      OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team");
     157      box->pack( buttonTeam0 );
     158      buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0);
     159
     160      OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team");
     161      box->pack( buttonTeam1 );
     162      buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1);
    175163
    176164      if ( bShowTeamChange )
     
    307295
    308296  if ( team == 0 || team == 1 )
    309     return ObjectListBase::retrieveIdentity("TurbineHover");
     297    return ObjectListBase::retrieveIdentity("FPSPlayer");
    310298
    311299  assert( false );
     
    315303std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId )
    316304{
    317   if (classId == CL_TURBINE_HOVER)
    318     return "models/ships/hoverglider_mainbody.obj";
    319305  if ( team == 0 )
    320306    return "models/creatures/doom_guy.md2";
     
    322308    return "models/creatures/male.md2";
    323309  else
     310  {
    324311    return "";
     312  }
    325313}
    326314
    327315std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId )
    328316{
    329   if ( classId == CL_FPS_PLAYER )
     317  if ( team == 0 || team == 1 )
    330318  {
    331319    if ( team == 0 )
    332       return "maps/doom_guy.png";
     320      return "doom_guy.png";
    333321    else
    334       return "maps/male_fiend.pcx";
     322      return "male_fiend.pcx";
    335323  }
    336324
     
    340328float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId )
    341329{
    342   if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER))
     330  if ( classId == FPSPlayer::staticClassID() )
    343331  {
    344332    return 10.0f;
     
    499487
    500488  assert( bo != NULL );
    501   assert( bo->isA( CL_PLAYABLE ) );
     489  assert( bo->isA( Playable::staticClassID() ) );
    502490
    503491  Playable & playable = *(dynamic_cast<Playable*>(bo));
    504492
     493  PRINTF(0)("%s %s %f\n", playableModel.c_str(), playableTexture.c_str(), playableScale );
     494 
    505495  playable.loadMD2Texture( playableTexture );
    506496  playable.loadModel( playableModel, playableScale );
  • trunk/src/util/signal_handler.cc

    r9406 r10114  
    4242  catchSignal( SIGSEGV );
    4343  catchSignal( SIGABRT );
     44  catchSignal( SIGILL );
    4445}
    4546
     
    9495    case SIGABRT:
    9596      sigName = "SIGABRT";
     97      break;
     98    case SIGILL:
     99      sigName = "SIGILL";
    96100      break;
    97101  }
  • trunk/src/util/singleplayer_shootemup.cc

    r9869 r10114  
    2525
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
     27
     28ObjectListDefinition(SingleplayerShootemup);
    2929CREATE_FACTORY(SingleplayerShootemup);
    3030
  • trunk/src/world_entities/bsp_entity.cc

    r9869 r10114  
    1919#include "loading/resource_manager.h"
    2020
    21 #include "class_id_DEPRECATED.h"
    22 ObjectListDefinitionID(BspEntity, CL_BSP_ENTITY);
     21
     22ObjectListDefinition(BspEntity);
    2323CREATE_FACTORY(BspEntity);
    2424
  • trunk/src/world_entities/creatures/fps_player.cc

    r10013 r10114  
    4141
    4242
    43 #include "class_id_DEPRECATED.h"
    44 ObjectListDefinitionID(FPSPlayer, CL_FPS_PLAYER);
     43
     44ObjectListDefinition(FPSPlayer);
    4545CREATE_FACTORY(FPSPlayer);
    4646
     
    273273  {
    274274    this->getWeaponManager().fire();
    275 
    276 //     WorldEntity* target = this->aimingSystem->getNearestTarget();
    277 //     if( target != NULL)
    278 //     {
    279 //       PRINTF(0)("hit hit hit, got: %s\n", target->getClassCName());
    280 //     }
    281 //     else
    282 //     {
    283 //       PRINTF(0)("nothing hit\n");
    284 //     }
    285275  }
    286276
    287277
    288278  //dealing damage
    289 
    290279  if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/))
    291280  {
     
    384373
    385374  // physical falling of the player
    386   if( !this->isOnGround())
     375  if( /*FIXME for testing*/ false && !this->isOnGround())
    387376  {
    388377    this->fallVelocity += 300.0f * time;
     
    404393
    405394
    406   if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(CL_INTERACTIVE_MODEL))
     395  if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(InteractiveModel::staticClassID()))
    407396  {
    408397    ((InteractiveModel*)this->getModel(0))->tick(time);
    409 
    410     // handle animations differently
    411 
    412 
    413 
    414 
    415 
    416 //     else if( this->bFire && likely(this->getModel(0) != NULL))
    417 //     {
    418 //       if( ((InteractiveModel*)this->getModel(0))->getAnim() != ATTACK)
    419 //         ((InteractiveModel*)this->getModel(0))->setAnimation(ATTACK);
    420 //     }
    421 //     else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL))
    422 //     {
    423 //       if( ((InteractiveModel*)this->getModel(0))->getAnim() != RUN)
    424 //         ((InteractiveModel*)this->getModel(0))->setAnimation(RUN);
    425 //     }
    426 //     else if (likely(this->getModel(0) != NULL))
    427 //     {
    428 //       if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)
    429 //         ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);
    430 //     }
    431398  }
    432399
  • trunk/src/world_entities/creatures/md2_creature.cc

    r10033 r10114  
    3636#include "debug.h"
    3737
    38 #include "class_id_DEPRECATED.h"
    39 ObjectListDefinitionID(MD2Creature, CL_MD2_CREATURE);
     38
     39ObjectListDefinition(MD2Creature);
    4040CREATE_FACTORY(MD2Creature);
    4141
  • trunk/src/world_entities/effects/billboard.cc

    r9869 r10114  
    2626
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(Billboard, CL_BILLBOARD);
     28
     29ObjectListDefinition(Billboard);
    3030CREATE_FACTORY(Billboard);
    3131
  • trunk/src/world_entities/effects/explosion.cc

    r9869 r10114  
    2727
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(Explosion, CL_EXPLOSION);
     29
     30ObjectListDefinition(Explosion);
    3131CREATE_FAST_FACTORY_STATIC(Explosion);
    3232
  • trunk/src/world_entities/effects/lightning_bolt.cc

    r9869 r10114  
    2525
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(LightningBolt, CL_LIGHTNING_BOLT);
     27
     28ObjectListDefinition(LightningBolt);
    2929CREATE_FACTORY(LightningBolt);
    3030
  • trunk/src/world_entities/elements/image_entity.cc

    r9869 r10114  
    3030
    3131
    32 #include "class_id_DEPRECATED.h"
    33 ObjectListDefinitionID(ImageEntity, CL_IMAGE_ENTITY);
     32
     33ObjectListDefinition(ImageEntity);
    3434CREATE_FACTORY(ImageEntity);
    3535
  • trunk/src/world_entities/elements/text_element.cc

    r9869 r10114  
    2727
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(TextElement, CL_TEXT_ELEMENT);
     29
     30ObjectListDefinition(TextElement);
    3131CREATE_FACTORY(TextElement);
    3232
  • trunk/src/world_entities/environment.cc

    r10033 r10114  
    2424#include "util/loading/factory.h"
    2525
    26 #include "class_id_DEPRECATED.h"
    27 ObjectListDefinitionID(Environment, CL_ENVIRONMENT);
     26
     27ObjectListDefinition(Environment);
    2828CREATE_FACTORY(Environment);
    2929
  • trunk/src/world_entities/environments/building.cc

    r9869 r10114  
    2323
    2424
    25 #include "class_id_DEPRECATED.h"
    26 ObjectListDefinitionID(Building, CL_BUILDING);
     25
     26ObjectListDefinition(Building);
    2727CREATE_FACTORY(Building);
    2828
  • trunk/src/world_entities/environments/mapped_water.cc

    r10034 r10114  
    2626#include "resource_shader.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(MappedWater, CL_MAPPED_WATER);
     28
     29ObjectListDefinition(MappedWater);
    3030CREATE_FACTORY(MappedWater);
    3131
  • trunk/src/world_entities/environments/model_entity.cc

    r9869 r10114  
    2323
    2424
    25 #include "class_id_DEPRECATED.h"
    26 ObjectListDefinitionID(ModelEntity, CL_MODEL_ENTITY);
     25
     26ObjectListDefinition(ModelEntity);
    2727CREATE_FACTORY(ModelEntity);
    2828
  • trunk/src/world_entities/environments/water.cc

    r9869 r10114  
    3232
    3333
    34 #include "class_id_DEPRECATED.h"
    35 ObjectListDefinitionID(Water, CL_WATER);
     34
     35ObjectListDefinition(Water);
    3636CREATE_FACTORY(Water);
    3737
  • trunk/src/world_entities/movie_entity.cc

    r9869 r10114  
    2121
    2222
    23 #include "class_id_DEPRECATED.h"
    24 ObjectListDefinitionID(MovieEntity, CL_MOVIE_ENTITY);
     23
     24ObjectListDefinition(MovieEntity);
    2525CREATE_FACTORY(MovieEntity);
    2626
  • trunk/src/world_entities/npcs/attractor_mine.cc

    r10013 r10114  
    3333#include "effects/explosion.h"
    3434
    35 #include "class_id_DEPRECATED.h"
    36 ObjectListDefinitionID(AttractorMine, CL_ATTRACTOR_MINE);
     35
     36ObjectListDefinition(AttractorMine);
    3737CREATE_FACTORY(AttractorMine);
    3838#include "script_class.h"
  • trunk/src/world_entities/npcs/door.cc

    r9869 r10114  
    2626#include "door.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(Door, CL_DOOR);
     28
     29ObjectListDefinition(Door);
    3030CREATE_FACTORY(Door);
    3131
  • trunk/src/world_entities/npcs/gate.cc

    r9869 r10114  
    3131
    3232
    33 #include "class_id_DEPRECATED.h"
    34 ObjectListDefinitionID(Gate, CL_GATE);
     33
     34ObjectListDefinition(Gate);
    3535CREATE_FACTORY(Gate);
    3636
  • trunk/src/world_entities/npcs/generic_npc.cc

    r10013 r10114  
    3333#include "bsp_entity.h"
    3434
    35 #include "class_id_DEPRECATED.h"
    36 ObjectListDefinitionID(GenericNPC, CL_GENERIC_NPC);
     35
     36ObjectListDefinition(GenericNPC);
    3737CREATE_FACTORY(GenericNPC);
    3838
  • trunk/src/world_entities/npcs/ground_turret.cc

    r9869 r10114  
    2929#include "effects/explosion.h"
    3030
    31 #include "class_id_DEPRECATED.h"
    3231
    33 ObjectListDefinitionID(GroundTurret, CL_GROUND_TURRET);
     32
     33ObjectListDefinition(GroundTurret);
    3434CREATE_FACTORY(GroundTurret);
    3535
  • trunk/src/world_entities/npcs/network_turret.cc

    r9869 r10114  
    3232#include "debug.h"
    3333
    34 #include "class_id_DEPRECATED.h"
    35 ObjectListDefinitionID(NetworkTurret, CL_NETWORK_TURRET);
     34
     35ObjectListDefinition(NetworkTurret);
    3636CREATE_FACTORY(NetworkTurret);
    3737
  • trunk/src/world_entities/npcs/npc_test.cc

    r9869 r10114  
    3030#include "effects/explosion.h"
    3131
    32 #include "class_id_DEPRECATED.h"
    33 ObjectListDefinitionID(NPC2, CL_NPC_TEST2);
     32
     33ObjectListDefinition(NPC2);
    3434CREATE_FACTORY(NPC2);
    3535
  • trunk/src/world_entities/npcs/repair_station.cc

    r9869 r10114  
    2626#include "repair_station.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(RepairStation, CL_DOOR +1 );
     28
     29ObjectListDefinition(RepairStation);
    3030CREATE_FACTORY(RepairStation);
    3131
  • trunk/src/world_entities/npcs/space_turret.cc

    r9869 r10114  
    2929#include "effects/explosion.h"
    3030
    31 #include "class_id_DEPRECATED.h"
    32 ObjectListDefinitionID(SpaceTurret, CL_SPACE_TURRET);
     31
     32ObjectListDefinition(SpaceTurret);
    3333CREATE_FACTORY(SpaceTurret);
    3434
  • trunk/src/world_entities/particles/box_emitter.cc

    r9869 r10114  
    2424#include "debug.h"
    2525
    26 #include "class_id_DEPRECATED.h"
    2726
    28 ObjectListDefinitionID(BoxEmitter, CL_BOX_EMITTER);
     27
     28ObjectListDefinition(BoxEmitter);
    2929CREATE_FACTORY(BoxEmitter);
    3030
  • trunk/src/world_entities/particles/dot_emitter.cc

    r9869 r10114  
    2626
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(DotEmitter, CL_DOT_EMITTER);
     28
     29ObjectListDefinition(DotEmitter);
    3030CREATE_FACTORY(DotEmitter);
    3131
  • trunk/src/world_entities/particles/dot_particles.cc

    r9869 r10114  
    2323#include "state.h"
    2424
    25 #include "class_id_DEPRECATED.h"
    2625
    27 ObjectListDefinitionID(DotParticles, CL_DOT_PARTICLES);
     26
     27ObjectListDefinition(DotParticles);
    2828CREATE_FACTORY(DotParticles);
    2929
  • trunk/src/world_entities/particles/model_particles.cc

    r9869 r10114  
    2525#include "debug.h"
    2626
    27 #include "class_id_DEPRECATED.h"
    2827
    29 ObjectListDefinitionID(ModelParticles, CL_MODEL_PARTICLES);
     28
     29ObjectListDefinition(ModelParticles);
    3030CREATE_FACTORY(ModelParticles);
    3131
  • trunk/src/world_entities/particles/plane_emitter.cc

    r9869 r10114  
    2424#include "debug.h"
    2525
    26 #include "class_id_DEPRECATED.h"
    2726
    28 ObjectListDefinitionID(PlaneEmitter, CL_PLANE_EMITTER);
     27
     28ObjectListDefinition(PlaneEmitter);
    2929CREATE_FACTORY(PlaneEmitter);
    3030
  • trunk/src/world_entities/particles/spark_particles.cc

    r9869 r10114  
    2424#include "shell_command.h"
    2525
    26 #include "class_id_DEPRECATED.h"
    2726
    28 ObjectListDefinitionID(SparkParticles, CL_SPARK_PARTICLES);
     27
     28ObjectListDefinition(SparkParticles);
    2929CREATE_FACTORY(SparkParticles);
    3030
  • trunk/src/world_entities/particles/sprite_particles.cc

    r9869 r10114  
    2424#include "shell_command.h"
    2525
    26 #include "class_id_DEPRECATED.h"
    2726
    28 ObjectListDefinitionID(SpriteParticles, CL_SPRITE_PARTICLES);
     27
     28ObjectListDefinition(SpriteParticles);
    2929CREATE_FACTORY(SpriteParticles);
    3030
  • trunk/src/world_entities/planet.cc

    r9869 r10114  
    3232#include "debug.h"
    3333
    34 #include "class_id_DEPRECATED.h"
    35 ObjectListDefinitionID(Planet, CL_PLANET);
     34
     35ObjectListDefinition(Planet);
    3636CREATE_FACTORY(Planet);
    3737
  • trunk/src/world_entities/power_ups/laser_power_up.cc

    r9869 r10114  
    2424
    2525
    26 #include "class_id_DEPRECATED.h"
    27 ObjectListDefinitionID(LaserPowerUp, CL_LASER_POWER_UP);
     26
     27ObjectListDefinition(LaserPowerUp);
    2828CREATE_FACTORY(LaserPowerUp);
    2929
     
    8080{
    8181 // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassCName(), entity->getClassCName(), location.x, location.y, location.z);
    82  if (entity->isA(CL_PLAYABLE))
     82  if (entity->isA(Playable::staticClassID()))
    8383  this->toList(OM_DEAD);
    8484}
  • trunk/src/world_entities/power_ups/param_power_up.cc

    r9869 r10114  
    2727
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(ParamPowerUp, CL_PARAM_POWER_UP);
     29
     30ObjectListDefinition(ParamPowerUp);
    3131CREATE_FACTORY(ParamPowerUp);
    3232
  • trunk/src/world_entities/power_ups/turret_power_up.cc

    r9869 r10114  
    2424
    2525
    26 #include "class_id_DEPRECATED.h"
    27 ObjectListDefinitionID(TurretPowerUp, CL_TURRET_POWER_UP);
     26
     27ObjectListDefinition(TurretPowerUp);
    2828CREATE_FACTORY(TurretPowerUp);
    2929
     
    7676{
    7777 // PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassCName(), entity->getClassCName(), location.x, location.y, location.z);
    78  if (entity->isA(CL_PLAYABLE))
     78  if (entity->isA(Playable::staticClassID()))
    7979   this->toList(OM_DEAD);
    8080}
  • trunk/src/world_entities/power_ups/weapon_power_up.cc

    r9869 r10114  
    2727#include "debug.h"
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(WeaponPowerUp, CL_WEAPON_POWER_UP);
     29
     30ObjectListDefinition(WeaponPowerUp);
    3131CREATE_FACTORY(WeaponPowerUp);
    3232
  • trunk/src/world_entities/projectiles/bomb.cc

    r9869 r10114  
    2525#include "debug.h"
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(Bomb, CL_BOMB);
     27
     28ObjectListDefinition(Bomb);
    2929CREATE_FAST_FACTORY_STATIC(Bomb);
    3030
     
    166166void Bomb::collidesWith (WorldEntity* entity, const Vector& location)
    167167{
    168   if (this->lifeCycle < .9f && entity->isA(CL_NPC))
     168  if (this->lifeCycle < .9f && entity->isA( "NPC" ))
    169169    this->lifeCycle = 0.9f;
    170170}
  • trunk/src/world_entities/projectiles/boomerang_projectile.cc

    r9869 r10114  
    2626#include "debug.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(BoomerangProjectile, CL_BOOMERANG_PROJECTILE);
     28
     29ObjectListDefinition(BoomerangProjectile);
    3030CREATE_FAST_FACTORY_STATIC(BoomerangProjectile);
    3131
  • trunk/src/world_entities/projectiles/guided_missile.cc

    r9869 r10114  
    2525#include "debug.h"
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(GuidedMissile, CL_GUIDED_MISSILE);
     27
     28ObjectListDefinition(GuidedMissile);
    2929CREATE_FAST_FACTORY_STATIC(GuidedMissile);
    3030
  • trunk/src/world_entities/projectiles/hyperblast.cc

    r9869 r10114  
    2525#include "debug.h"
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(Hyperblast, CL_HYPERBLAST);
     27
     28ObjectListDefinition(Hyperblast);
    2929CREATE_FAST_FACTORY_STATIC(Hyperblast);
    3030
  • trunk/src/world_entities/projectiles/laser.cc

    r9869 r10114  
    2828
    2929
    30 #include "class_id_DEPRECATED.h"
     30
    3131ObjectListDefinition(Laser);
    3232CREATE_FAST_FACTORY_STATIC(Laser);
     
    107107void Laser::collidesWith(WorldEntity* entity, const Vector& location)
    108108{
    109   if (this->hitEntity != entity && entity->isA(CL_NPC))
     109  if (this->hitEntity != entity && entity->isA( "NPC" ))
    110110    this->destroy( entity );
    111111  this->hitEntity = entity;
  • trunk/src/world_entities/projectiles/rail_projectile.cc

    r9869 r10114  
    2828
    2929
    30 #include "class_id_DEPRECATED.h"
    31 ObjectListDefinitionID(RailProjectile, CL_RAIL_PROJECTILE);
     30
     31ObjectListDefinition(RailProjectile);
    3232CREATE_FAST_FACTORY_STATIC(RailProjectile);
    3333
     
    106106void RailProjectile::collidesWith(WorldEntity* entity, const Vector& location)
    107107{
    108   if (this->hitEntity != entity && entity->isA(CL_NPC))
     108  if (this->hitEntity != entity && entity->isA( "NPC" ))
    109109    this->destroy( entity );
    110110  this->hitEntity = entity;
  • trunk/src/world_entities/projectiles/rocket.cc

    r9869 r10114  
    2525#include "debug.h"
    2626
    27 #include "class_id_DEPRECATED.h"
    28 ObjectListDefinitionID(Rocket, CL_ROCKET);
     27
     28ObjectListDefinition(Rocket);
    2929CREATE_FAST_FACTORY_STATIC(Rocket);
    3030
  • trunk/src/world_entities/projectiles/test_bullet.cc

    r9869 r10114  
    2424#include "debug.h"
    2525
    26 #include "class_id_DEPRECATED.h"
    27 ObjectListDefinitionID(TestBullet, CL_TEST_BULLET);
     26
     27ObjectListDefinition(TestBullet);
    2828CREATE_FAST_FACTORY_STATIC(TestBullet);
    2929
     
    119119void TestBullet::collidesWith(WorldEntity* entity, const Vector& location)
    120120{
    121   if (this->hitEntity != entity && entity->isA(CL_NPC))
     121  if (this->hitEntity != entity && entity->isA( "NPC" ))
    122122    this->destroy( entity );
    123123  this->hitEntity = entity;
  • trunk/src/world_entities/recorder.cc

    r9869 r10114  
    2121#include "debug.h"
    2222
    23 #include "class_id_DEPRECATED.h"
    24 ObjectListDefinitionID(Recorder, CL_RECORDER);
     23
     24ObjectListDefinition(Recorder);
    2525CREATE_FACTORY(Recorder);
    2626
  • trunk/src/world_entities/skybox.cc

    r9869 r10114  
    3131#include "debug.h"
    3232
    33 #include "class_id_DEPRECATED.h"
    34 ObjectListDefinitionID(SkyBox, CL_SKYBOX);
     33
     34ObjectListDefinition(SkyBox);
    3535CREATE_FACTORY(SkyBox);
    3636
  • trunk/src/world_entities/space_ships/collision_probe.cc

    r9869 r10114  
    2424
    2525
    26 #include "class_id_DEPRECATED.h"
    27 ObjectListDefinitionID(CollisionProbe, CL_COLLISION_PROBE);
     26
     27ObjectListDefinition(CollisionProbe);
    2828
    2929CREATE_FACTORY(CollisionProbe);
  • trunk/src/world_entities/space_ships/cruizer.cc

    r9869 r10114  
    3434#include "debug.h"
    3535
    36 #include "class_id_DEPRECATED.h"
    37 ObjectListDefinitionID(Cruizer, CL_CRUIZER);
     36
     37ObjectListDefinition(Cruizer);
    3838CREATE_FACTORY(Cruizer);
    3939
  • trunk/src/world_entities/space_ships/helicopter.cc

    r9869 r10114  
    3434#include "debug.h"
    3535
    36 #include "class_id_DEPRECATED.h"
    37 ObjectListDefinitionID(Helicopter, CL_HELICOPTER);
     36
     37ObjectListDefinition(Helicopter);
    3838CREATE_FACTORY(Helicopter);
    3939#include "script_class.h"
  • trunk/src/world_entities/space_ships/hover.cc

    r9869 r10114  
    3434#include "debug.h"
    3535
    36 #include "class_id_DEPRECATED.h"
    37 ObjectListDefinitionID(Hover, CL_HOVER);
     36
     37ObjectListDefinition(Hover);
    3838CREATE_FACTORY(Hover);
    3939
  • trunk/src/world_entities/space_ships/space_ship.cc

    r9869 r10114  
    5353
    5454
    55 #include "class_id_DEPRECATED.h"
    56 ObjectListDefinitionID(SpaceShip, CL_SPACE_SHIP);
     55
     56ObjectListDefinition(SpaceShip);
    5757CREATE_FACTORY(SpaceShip);
    5858
  • trunk/src/world_entities/space_ships/spacecraft_2d.cc

    r10013 r10114  
    3838
    3939
    40 #include "class_id_DEPRECATED.h"
    41 ObjectListDefinitionID(Spacecraft2D, CL_SPACECRAFT_2D);
     40
     41ObjectListDefinition(Spacecraft2D);
    4242CREATE_FACTORY(Spacecraft2D);
    4343
  • trunk/src/world_entities/space_ships/turbine_hover.cc

    r9869 r10114  
    3434#include "debug.h"
    3535
    36 #include "class_id_DEPRECATED.h"
    37 ObjectListDefinitionID(TurbineHover, CL_TURBINE_HOVER);
     36
     37ObjectListDefinition(TurbineHover);
    3838CREATE_FACTORY(TurbineHover);
    3939
  • trunk/src/world_entities/spawning_point.cc

    r9869 r10114  
    3333#include "converter.h"
    3434
    35 #include "class_id_DEPRECATED.h"
    36 ObjectListDefinitionID(SpawningPoint, CL_SPAWNING_POINT);
     35
     36ObjectListDefinition(SpawningPoint);
    3737CREATE_FACTORY( SpawningPoint);
    3838/**
  • trunk/src/world_entities/spectator.cc

    r10108 r10114  
    2222#include "shared_network_data.h"
    2323
    24 #include "class_id_DEPRECATED.h"
    25 ObjectListDefinitionID(Spectator, CL_SPECTATOR);
     24#include "src/world_entities/creatures/fps_player.h"
     25#include "src/world_entities/npcs/generic_npc.h"
     26
     27
     28ObjectListDefinition(Spectator);
    2629CREATE_FACTORY(Spectator);
    2730
     
    8386  registerEvent(KeyMapper::PEV_RIGHT);
    8487  registerEvent(KeyMapper::PEV_FIRE1);
     88  registerEvent(KeyMapper::PEV_JUMP);
    8589  registerEvent(EV_MOUSE_MOTION);
    8690
     
    233237    this->yMouse += event.yRel;
    234238  }
    235 }
    236 
    237 
    238 
    239 
     239  else if( event.type == KeyMapper::PEV_JUMP)
     240  {
     241//     FPSPlayer * fps = new FPSPlayer();
     242    //GenericNPC* fps = new GenericNPC();
     243    WorldEntity* fps = new WorldEntity();
     244    //WorldEntity * fps = new WorldEntity();
     245
     246    fps->setAbsCoor( this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ() );
     247    fps->setAbsDir( this->getAbsDir() );
     248    fps->loadMD2Texture( "doom_guy.png" );
     249    fps->loadModel( "models/creatures/doom_guy.md2", 10.0f );
     250    fps->toList( OM_GROUP_00);
     251    //fps->loadModel( "models/ships/terran_cruizer.obj" );
     252
     253    //((Playable*)fps)->setPlayDirection(  0, 0, 1, 0 );
     254  }
     255}
     256
     257
     258
     259
  • trunk/src/world_entities/terrain.cc

    r9877 r10114  
    3434#include "debug.h"
    3535
    36 #include "class_id_DEPRECATED.h"
    37 ObjectListDefinitionID(Terrain, CL_TERRAIN);
     36
     37ObjectListDefinition(Terrain);
    3838CREATE_FACTORY(Terrain);
    3939
  • trunk/src/world_entities/test_entity.cc

    r9928 r10114  
    3333
    3434
    35 #include "class_id_DEPRECATED.h"
     35
    3636ObjectListDefinition(TestEntity);
    3737CREATE_FACTORY(TestEntity);
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r9869 r10114  
    2727#include "util/loading/factory.h"
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(AimingTurret, CL_AIMING_TURRET);
     29
     30ObjectListDefinition(AimingTurret);
    3131CREATE_FACTORY(AimingTurret);
    3232
  • trunk/src/world_entities/weapons/boomerang_gun.cc

    r9869 r10114  
    2727#include "util/loading/factory.h"
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(BoomerangGun, CL_BOOMERANG_GUN);
     29
     30ObjectListDefinition(BoomerangGun);
    3131CREATE_FACTORY(BoomerangGun);
    3232
  • trunk/src/world_entities/weapons/cannon.cc

    r9869 r10114  
    3636
    3737
    38 #include "class_id_DEPRECATED.h"
    39 ObjectListDefinitionID(Cannon, CL_CANNON);
     38
     39ObjectListDefinition(Cannon);
    4040CREATE_FACTORY(Cannon);
    4141
  • trunk/src/world_entities/weapons/fps_sniper_rifle.cc

    r9869 r10114  
    3939
    4040
    41 #include "class_id_DEPRECATED.h"
    42 ObjectListDefinitionID(FPSSniperRifle, CL_FPS_SNIPER_RIFLE);
     41
     42ObjectListDefinition(FPSSniperRifle);
    4343CREATE_FACTORY(FPSSniperRifle);
    4444
  • trunk/src/world_entities/weapons/hyperblaster.cc

    r9869 r10114  
    3535
    3636
    37 #include "class_id_DEPRECATED.h"
    38 ObjectListDefinitionID(Hyperblaster, CL_HYPERBLASTER);
     37
     38ObjectListDefinition(Hyperblaster);
    3939CREATE_FACTORY(Hyperblaster);
    4040
  • trunk/src/world_entities/weapons/laser_cannon.cc

    r9869 r10114  
    3131#include "loading/fast_factory.h"
    3232
    33 #include "class_id_DEPRECATED.h"
    34 ObjectListDefinitionID(LaserCannon, CL_LASER_CANNON);
     33
     34ObjectListDefinition(LaserCannon);
    3535CREATE_FACTORY(LaserCannon);
    3636
  • trunk/src/world_entities/weapons/targeting_turret.cc

    r9869 r10114  
    2626#include "util/loading/factory.h"
    2727
    28 #include "class_id_DEPRECATED.h"
    29 ObjectListDefinitionID(TargetingTurret, CL_TARGETING_TURRET);
     28
     29ObjectListDefinition(TargetingTurret);
    3030CREATE_FACTORY(TargetingTurret);
    3131
  • trunk/src/world_entities/weapons/test_gun.cc

    r9869 r10114  
    3333#include "loading/fast_factory.h"
    3434
    35 #include "class_id_DEPRECATED.h"
    36 ObjectListDefinitionID(TestGun, CL_TEST_GUN);
     35
     36ObjectListDefinition(TestGun);
    3737CREATE_FACTORY(TestGun);
    3838/**
  • trunk/src/world_entities/weapons/turret.cc

    r9869 r10114  
    2727#include "util/loading/factory.h"
    2828
    29 #include "class_id_DEPRECATED.h"
    30 ObjectListDefinitionID(Turret, CL_TURRET);
     29
     30ObjectListDefinition(Turret);
    3131CREATE_FACTORY(Turret);
    3232
  • trunk/src/world_entities/weather_effects/cloud_effect.cc

    r10034 r10114  
    3030#include "resource_shader.h"
    3131
    32 #include "class_id_DEPRECATED.h"
     32
    3333
    3434Vector    CloudEffect::cloudColor;
     
    4141float     CloudEffect::fadeTime;
    4242
    43 ObjectListDefinitionID(CloudEffect, CL_CLOUD_EFFECT);
     43ObjectListDefinition(CloudEffect);
    4444
    4545
  • trunk/src/world_entities/weather_effects/fog_effect.cc

    r9869 r10114  
    3030SHELL_COMMAND(fadeout, FogEffect, fadeOutFog);
    3131
    32 #include "class_id_DEPRECATED.h"
     32
    3333
    3434CREATE_SCRIPTABLE_CLASS(FogEffect,
  • trunk/src/world_entities/weather_effects/lense_flare.cc

    r9869 r10114  
    3434#include "camera.h"
    3535
    36 #include "class_id_DEPRECATED.h"
    37 
    38 ObjectListDefinitionID(LenseFlare, CL_LENSE_FLARE);
     36
     37
     38ObjectListDefinition(LenseFlare);
    3939CREATE_FACTORY(LenseFlare);
    4040
  • trunk/src/world_entities/weather_effects/lightning_effect.cc

    r9869 r10114  
    2828#include "script_class.h"
    2929#include "debug.h"
    30 #include "class_id_DEPRECATED.h"
    31 
    32 ObjectListDefinitionID(LightningEffect, CL_LIGHTNING_EFFECT);
     30
     31
     32ObjectListDefinition(LightningEffect);
    3333
    3434SHELL_COMMAND(activate, LightningEffect, activateLightning);
  • trunk/src/world_entities/weather_effects/rain_effect.cc

    r9869 r10114  
    3232#include "debug.h"
    3333
    34 #include "class_id_DEPRECATED.h"
    35 
    36 ObjectListDefinitionID(RainEffect, CL_RAIN_EFFECT);
     34
     35
     36ObjectListDefinition(RainEffect);
    3737
    3838// Define shell commands
  • trunk/src/world_entities/weather_effects/snow_effect.cc

    r9869 r10114  
    3030#include "cloud_effect.h"
    3131
    32 #include "class_id_DEPRECATED.h"
    33 
    34 ObjectListDefinitionID(SnowEffect, CL_SNOW_EFFECT);
     32
     33
     34ObjectListDefinition(SnowEffect);
    3535SHELL_COMMAND(activate, SnowEffect, activateSnow);
    3636SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow);
  • trunk/src/world_entities/weather_effects/volfog_effect.cc

    r9869 r10114  
    4949
    5050
    51 #include "class_id_DEPRECATED.h"
    52 ObjectListDefinitionID(VolFogEffect, CL_VOLFOG_EFFECT);
     51
     52ObjectListDefinition(VolFogEffect);
    5353CREATE_FACTORY(VolFogEffect);
    5454
Note: See TracChangeset for help on using the changeset viewer.