- Timestamp:
- Dec 19, 2006, 11:55:26 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 1 deleted
- 109 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r9869 r10114 59 59 defs/globals.h \ 60 60 defs/compiler.h \ 61 defs/class_id_DEPRECATED.h \62 61 subprojects/benchmark.h 63 62 -
trunk/src/lib/graphics/importer/md2/md2Model.cc
r9869 r10114 92 92 rebuildInfo(); 93 93 94 //this->debug();94 this->debug(); 95 95 } 96 96 … … 99 99 { 100 100 this->init(); 101 102 this->scaleFactor = model.scaleFactor; 103 101 104 this->rebuildInfo(); 102 105 } … … 104 107 MD2Model& MD2Model::operator=(const MD2Model& md2model) 105 108 { 109 this->init(); 110 this->scaleFactor = md2model.scaleFactor; 106 111 this->data = md2model.data; 107 112 this->rebuildInfo(); … … 141 146 this->data = MD2Data::Pointer(new MD2Data(modelFileName, skinFileName, scale)); 142 147 this->rebuildInfo(); 148 149 // init the animation - do not remove 150 this->tick( 0.01); 151 152 return true; 143 153 } 144 154 … … 268 278 /** 269 279 * @brief draws the model: interface for all other classes out in the world 270 * @todo make it const and virtual271 * FIXME272 280 */ 273 281 void MD2Model::draw() const … … 313 321 glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]); 314 322 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]); 315 324 } 316 325 glEnd(); … … 325 334 { 326 335 //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; 328 337 /* some face culling stuff */ 329 338 // glPushAttrib(GL_POLYGON_BIT); … … 428 437 PRINT(0)("= Number of Frames: \t%i\n", this->data->header->numFrames); 429 438 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()); 431 441 PRINT(0)("===================================================\n\n"); 432 442 } … … 452 462 this->loadModel(modelFileName); 453 463 this->loadSkin(skinFileName); 464 465 PRINTF(0)("model %s, skin %s\n", modelFileName.c_str(), skinFileName.c_str()); 454 466 } 455 467 … … 570 582 delete [] buffer; 571 583 fclose(pFile); 584 585 return true; 572 586 } 573 587 … … 592 606 this->material.setIllum(3); 593 607 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 20 20 PRINTF(0)("NOT FOUND MD2: %s\n", modelName.c_str()); 21 21 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()); 23 24 this->MD2Model::load(modelFileName, skinName, scale); 24 this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skin Name, scale), keepLevel, this->MD2Model::dataPointer()));25 this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinFileName, scale), keepLevel, this->MD2Model::dataPointer())); 25 26 } 26 27 -
trunk/src/lib/graphics/light.cc
r9869 r10114 26 26 #include "debug.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 30 ObjectListDefinitionID(Light, CL_LIGHT); 28 ObjectListDefinition(Light); 31 29 CREATE_FACTORY(Light); 32 30 -
trunk/src/lib/graphics/render2D/image_plane.cc
r9869 r10114 23 23 #include "p_node.h" 24 24 25 26 #include "class_id_DEPRECATED.h" 27 28 ObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE); 25 ObjectListDefinition(ImagePlane); 29 26 CREATE_FACTORY(ImagePlane); 30 27 -
trunk/src/lib/graphics/shader_data.cc
r9869 r10114 63 63 { 64 64 PRINTF(2)("Shaders are not supported on your hardware\n"); 65 } 65 return true; 66 } 67 68 return true; 66 69 } 67 70 -
trunk/src/lib/graphics/text_engine/limited_width_text.cc
r9869 r10114 33 33 this->setLineWidth(lineWidth); 34 34 } 35 35 36 36 37 /** -
trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc
r9869 r10114 26 26 #include "debug.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN); 28 ObjectListDefinition(GLMenuImageScreen); 30 29 CREATE_FACTORY(GLMenuImageScreen); 31 30 -
trunk/src/lib/lang/base_object.cc
r9869 r10114 35 35 } 36 36 37 /** 38 * copyconstructor 39 * @param bo instance to copy 40 */ 41 BaseObject::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 37 50 /** 38 51 * @brief standard deconstructor … … 45 58 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) 46 59 { 47 if (ORX_DEBUG >= 5)60 //if (ORX_DEBUG >= 5) 48 61 assert((*it)._objectList->checkIteratorInList((*it)._iterator) || (*it)._objectList->checkObjectInList(this)); 49 62 (*it)._objectList->unregisterObject((*it)._iterator); -
trunk/src/lib/lang/base_object.h
r9869 r10114 30 30 public: 31 31 BaseObject (const std::string& objectName = ""); 32 BaseObject( const BaseObject& bo ); 32 33 33 34 virtual ~BaseObject (); … … 51 52 /** @returns the ClassID of this Object */ 52 53 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(); }55 54 56 55 bool isA(const ObjectListBase& objectList) const; -
trunk/src/lib/lang/object_list.cc
r9869 r10114 25 25 * @return a new NewObejctList 26 26 */ 27 ObjectListBase::ObjectListBase(const std::string& className , int id)27 ObjectListBase::ObjectListBase(const std::string& className) 28 28 : _name(className) 29 29 { … … 36 36 assert(!ObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)"); 37 37 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 44 42 assert(!ObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)"); 45 43 … … 330 328 return -1; 331 329 } 330 331 332 /** 333 * replace all ids. list must contain all (and no more) ids 334 * @param str2id list: string -> newId 335 */ 336 void 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 */ 361 std::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 32 32 * @brief Use this macro to easily define a Class to store its own ObjectListDefinition 33 33 * @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 ObjectListDefinition41 * @param ClassName: the Name of the Class.42 34 */ 43 35 #define ObjectListDefinition(ClassName) \ 44 ObjectList DefinitionID(ClassName, -1)36 ObjectList<ClassName> ClassName::_objectList(#ClassName) 45 37 46 38 class BaseObject; … … 109 101 110 102 protected: 111 ObjectListBase(const std::string& className , int id = -1);103 ObjectListBase(const std::string& className); 112 104 virtual ~ObjectListBase(); 113 105 … … 133 125 static NameMap* _classesByName; //!< A Map of all the classes in existance. 134 126 static std::list<std::string> _classNames; //!< A list of all the registered ClassNames. 127 128 public: 129 static void replaceIDMap( const std::map<std::string, int>& str2id ); 130 static std::map<std::string, int>* createStrToId(); 135 131 }; 136 132 … … 199 195 200 196 public: 201 ObjectList(const std::string& name , int id = -1);197 ObjectList(const std::string& name); 202 198 ~ObjectList(); 203 199 … … 256 252 */ 257 253 template <class T> 258 ObjectList<T>::ObjectList(const std::string& name , int id)259 : ObjectListBase(name , id)254 ObjectList<T>::ObjectList(const std::string& name) 255 : ObjectListBase(name) 260 256 {} 261 257 -
trunk/src/lib/network/Makefile.am
r9656 r10114 43 43 synchronizeable_var/synchronizeable_uint.cc \ 44 44 synchronizeable_var/synchronizeable_ip.cc \ 45 synchronizeable_var/synchronizeable_classid.cc \ 46 synchronizeable_var/synchronizeable_classid_list.cc \ 45 47 \ 46 48 ip.cc … … 94 96 synchronizeable_var/synchronizeable_uint.h \ 95 97 synchronizeable_var/synchronizeable_ip.h \ 98 synchronizeable_var/synchronizeable_classid.h \ 99 synchronizeable_var/synchronizeable_classid_list.h \ 96 100 \ 97 101 ip.h -
trunk/src/lib/network/handshake.cc
r9869 r10114 22 22 #include "debug.h" 23 23 24 #include "synchronizeable_var/synchronizeable_classid_list.h" 25 26 std::map< std::string, int >* Handshake::classIdList = NULL; 24 27 25 28 ObjectListDefinition(Handshake); … … 32 35 this->registerObject(this, Handshake::_objectList); 33 36 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 } 34 49 35 50 // register all variable handlers … … 52 67 registerVar( new SynchronizeableIP( &this->proxy2, &this->proxy2, "proxy server 2", PERMISSION_MASTER_SERVER ) ); 53 68 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 ) ); 54 71 55 72 -
trunk/src/lib/network/handshake.h
r9869 r10114 113 113 int errorString_handler; //!< handshake error string handler 114 114 int candel_id; //!< handshake deletion handler 115 int nodeType; //! ,the type of the network node115 int nodeType; //!< the type of the network node 116 116 117 117 int redirectProxy; //!< true if the client should reconnect to a proxy server 118 118 IP proxy1; //!< ip address of the first proxy (0.0.0.0 of not available) 119 119 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; } 120 124 }; 121 125 -
trunk/src/lib/network/message_manager.cc
r9869 r10114 242 242 assert( i + messageLength <= length ); 243 243 // 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 244 250 assert( messageHandlerMap.find( (MessageType)messageType ) != messageHandlerMap.end()); 245 251 -
trunk/src/lib/network/network_game_manager.cc
r9869 r10114 111 111 playable.loadMD2Texture( playableTexture ); 112 112 playable.setTeam(team); 113 playable.loadModel( playableModel, 100.0f);113 playable.loadModel( playableModel, playableScale ); 114 114 playable.setOwner( userId ); 115 115 playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() ); -
trunk/src/lib/network/network_stream.cc
r9869 r10114 128 128 129 129 this->bRedirect = false; 130 this->bSoftRedirect = false; 130 131 131 132 this->currentState = 0; … … 716 717 // init the new message manager 717 718 MessageManager::getInstance()->setUniqueID( it->second.handshake->getMessageManagerId() ); 719 ObjectListBase::replaceIDMap( *(it->second.handshake->getClassIdList()) ); 718 720 } 719 721 … … 966 968 967 969 // if handshake not finished only sync handshake 968 if ( peer->second.handshake && Handshake::staticClassID() != sync.get LeafClassID())970 if ( peer->second.handshake && Handshake::staticClassID() != sync.getClassID() ) 969 971 continue; 970 972 … … 972 974 if ( ( SharedNetworkData::getInstance()->isMasterServer() || 973 975 SharedNetworkData::getInstance()->isProxyServerActive() && peer->second.isClient()) 974 && Handshake::staticClassID() == sync.get LeafClassID() && sync.getUniqueID() != peer->second.userId )976 && Handshake::staticClassID() == sync.getClassID() && sync.getUniqueID() != peer->second.userId ) 975 977 continue; 976 978 977 979 /* list of synchronizeables that will never be synchronized over the network: */ 978 980 // do not sync null parent 979 if ( NullParent::staticClassID() == sync.get LeafClassID())981 if ( NullParent::staticClassID() == sync.getClassID()) 980 982 continue; 981 983 982 984 983 assert( sync.get LeafClassID() != 0);985 assert( sync.getClassID() != 0); 984 986 985 987 assert( offset + INTSIZE <= UDP_PACKET_SIZE ); … … 1188 1190 if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId) 1189 1191 { 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); 1191 1193 offset += syncDataLength; 1192 1194 continue; 1193 1195 } 1194 1196 else 1195 ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId);1196 1197 b = Factory::fabricate( ObjectListBase::retrieveIdentity( leafClassId ) ); 1198 1197 1199 if ( !b ) 1198 1200 { 1199 PRINTF(1)("Could not fabricate Object with classID % x\n", leafClassId);1201 PRINTF(1)("Could not fabricate Object with classID %d\n", leafClassId); 1200 1202 offset += syncDataLength; 1201 1203 continue; … … 1208 1210 sync->setSynchronized(true); 1209 1211 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()); 1211 1213 } 1212 1214 else 1213 1215 { 1214 PRINTF(1)("Class with ID % xis not a synchronizeable!\n", (int)leafClassId);1216 PRINTF(1)("Class with ID %d is not a synchronizeable!\n", (int)leafClassId); 1215 1217 delete b; 1216 1218 offset += syncDataLength; -
trunk/src/lib/network/peer_info.h
r9656 r10114 36 36 int userId; //!< id of this network node 37 37 int nodeType; //!< type of this network node 38 IP ip; //! >the ip address of this network node38 IP ip; //!< the ip address of this network node 39 39 40 40 NetworkSocket * socket; //!< socket connecting to this node -
trunk/src/lib/network/player_stats.cc
r9869 r10114 30 30 #include "shell_command.h" 31 31 32 #include "class_id_DEPRECATED.h" 33 34 ObjectListDefinition ID(PlayerStats, CL_PLAYER_STATS);32 33 34 ObjectListDefinition(PlayerStats); 35 35 CREATE_FACTORY(PlayerStats); 36 36 -
trunk/src/lib/network/synchronizeable.cc
r9869 r10114 30 30 31 31 #include "converter.h" 32 33 #include "synchronizeable_var/synchronizeable_classid.h" 32 34 33 35 … … 56 58 /* make sure loadClassId is first synced var because this is read by networkStream */ 57 59 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) ); 59 63 60 64 this->registerVar( new SynchronizeableInt( &this->owner, &this->owner, "owner", PERMISSION_MASTER_SERVER ) ); … … 267 271 // PRINTF(0)("sending %s %d\n", (*it)->getName().c_str(), n); 268 272 269 // if( this->isA( CL_PLAYABLE))273 // if( this->isA( Playable::staticClassID() )) 270 274 // { 271 275 // PRINTF(0)("ms: %i, ps: %i, c: %i, sender: %i, reciever: %i, owner: %i, perm: (ow %i, ms %i, s %i, a %i)\n", … … 453 457 //(*it)->debug(); 454 458 455 // if( this->isA( CL_PLAYABLE))459 // if( this->isA(Playable::staticClassID())) 456 460 // { 457 461 // 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 21 21 #include "util/loading/factory.h" 22 22 23 #include "class_id_DEPRECATED.h" 24 ObjectListDefinition ID(Gravity, CL_FIELD_GRAVITY);23 24 ObjectListDefinition(Gravity); 25 25 26 26 CREATE_FACTORY(Gravity); -
trunk/src/lib/physics/fields/point_gravity.cc
r9869 r10114 20 20 21 21 22 #include "class_id_DEPRECATED.h" 23 ObjectListDefinition ID(PointGravity, CL_FIELD_POINT_GRAVITY);22 23 ObjectListDefinition(PointGravity); 24 24 25 25 -
trunk/src/lib/physics/fields/twirl.cc
r9869 r10114 20 20 21 21 22 #include "class_id_DEPRECATED.h" 23 ObjectListDefinition ID(Twirl, CL_FIELD_TWIRL);22 23 ObjectListDefinition(Twirl); 24 24 25 25 -
trunk/src/lib/physics/physics_connection.cc
r9869 r10114 28 28 #include "util/loading/load_param.h" 29 29 30 #include "class_id_DEPRECATED.h" 30 31 31 ObjectListDefinition(PhysicsConnection); 32 32 CREATE_FACTORY(PhysicsConnection); -
trunk/src/orxonox.cc
r10015 r10114 87 87 #ifndef __WIN32__ 88 88 REGISTER_ARG_FLAG( _, write_bt_to_file, "misc", "bt-to-file", "Write backtrace to file", "1"); 89 REGISTER_ARG_FLAG( _, dont_catch_signals, "misc", "bt-to-file", "Write backtrace to file", "0"); 89 90 #endif 90 91 -
trunk/src/story_entities/menu/game_menu.cc
r9869 r10114 41 41 #include "parser/preferences/preferences.h" 42 42 43 #include "class_id_DEPRECATED.h" 43 44 44 //! This creates a Factory to fabricate a GameMenu 45 ObjectListDefinition ID(GameMenu, CL_GAME_MENU);45 ObjectListDefinition(GameMenu); 46 46 CREATE_FACTORY(GameMenu); 47 47 -
trunk/src/story_entities/movie_loader.cc
r9869 r10114 25 25 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(MovieLoader, CL_MOVIE_LOADER);27 28 ObjectListDefinition(MovieLoader); 29 29 CREATE_FACTORY(MovieLoader); 30 30 -
trunk/src/story_entities/multi_player_world.cc
r9869 r10114 36 36 SHELL_COMMAND(debug, MultiPlayerWorld, debug); 37 37 38 #include "class_id_DEPRECATED.h" 38 39 39 //! This creates a Factory to fabricate a MultiPlayerWorld 40 ObjectListDefinition ID(MultiPlayerWorld, CL_MULTI_PLAYER_WORLD);40 ObjectListDefinition(MultiPlayerWorld); 41 41 CREATE_FACTORY(MultiPlayerWorld); 42 42 -
trunk/src/story_entities/multi_player_world_data.cc
r9869 r10114 149 149 BaseObject* created = Factory::fabricate(element); 150 150 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()); 152 152 else 153 153 PRINTF(1)("NetworkWorld: could not create this entity\n"); … … 180 180 181 181 if( created != NULL ) 182 PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassCName(), created->getCName(), created->get LeafClassID(), element->Value());182 PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassCName(), created->getCName(), created->getClassID().id(), element->Value()); 183 183 else 184 184 PRINTF(1)("NetworkWorld: could not create this entity\n"); -
trunk/src/story_entities/single_player_world.cc
r9869 r10114 30 30 31 31 32 #include "class_id_DEPRECATED.h" 32 33 33 //! This creates a Factory to fabricate a SinglePlayerWorld 34 ObjectListDefinition ID(SinglePlayerWorld, CL_SINGLE_PLAYER_WORLD);34 ObjectListDefinition(SinglePlayerWorld); 35 35 CREATE_FACTORY(SinglePlayerWorld); 36 36 -
trunk/src/subprojects/network/simple_sync.cc
r9869 r10114 22 22 #include "simple_sync.h" 23 23 24 #include "class_id_DEPRECATED.h" 24 25 25 #include "loading/fast_factory.h" 26 26 #include "lib/util/loading/factory.h" -
trunk/src/util/game_rules.cc
r9869 r10114 65 65 PRINTF(4)("Adding Mission Goal:%s\n", element->Value()); 66 66 BaseObject* created = Factory::fabricate(element); 67 if (created != NULL /*&& created->isA( CL_GAME_RULES)*/)67 if (created != NULL /*&& created->isA(GameRules::staticClassID())*/) 68 68 { 69 69 MissionGoal* mg = dynamic_cast<MissionGoal*>(created); -
trunk/src/util/kill_target.cc
r9869 r10114 22 22 23 23 24 #include "class_id_DEPRECATED.h" 25 ObjectListDefinition ID(KillTarget, CL_KILL_TARGET);24 25 ObjectListDefinition(KillTarget); 26 26 CREATE_FACTORY(KillTarget); 27 27 -
trunk/src/util/multiplayer_team_deathmatch.cc
r9869 r10114 46 46 #include "spawning_point.h" 47 47 48 49 50 #include "class_id_DEPRECATED.h" 51 52 ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH); 48 #include "creatures/fps_player.h" 49 50 ObjectListDefinition(MultiplayerTeamDeathmatch); 53 51 CREATE_FACTORY(MultiplayerTeamDeathmatch); 54 52 /** … … 148 146 box->setAbsCoor2D( 300, 100 ); 149 147 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); 175 163 176 164 if ( bShowTeamChange ) … … 307 295 308 296 if ( team == 0 || team == 1 ) 309 return ObjectListBase::retrieveIdentity(" TurbineHover");297 return ObjectListBase::retrieveIdentity("FPSPlayer"); 310 298 311 299 assert( false ); … … 315 303 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId ) 316 304 { 317 if (classId == CL_TURBINE_HOVER)318 return "models/ships/hoverglider_mainbody.obj";319 305 if ( team == 0 ) 320 306 return "models/creatures/doom_guy.md2"; … … 322 308 return "models/creatures/male.md2"; 323 309 else 310 { 324 311 return ""; 312 } 325 313 } 326 314 327 315 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ) 328 316 { 329 if ( classId == CL_FPS_PLAYER)317 if ( team == 0 || team == 1 ) 330 318 { 331 319 if ( team == 0 ) 332 return " maps/doom_guy.png";320 return "doom_guy.png"; 333 321 else 334 return "ma ps/male_fiend.pcx";322 return "male_fiend.pcx"; 335 323 } 336 324 … … 340 328 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId ) 341 329 { 342 if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER))330 if ( classId == FPSPlayer::staticClassID() ) 343 331 { 344 332 return 10.0f; … … 499 487 500 488 assert( bo != NULL ); 501 assert( bo->isA( CL_PLAYABLE) );489 assert( bo->isA( Playable::staticClassID() ) ); 502 490 503 491 Playable & playable = *(dynamic_cast<Playable*>(bo)); 504 492 493 PRINTF(0)("%s %s %f\n", playableModel.c_str(), playableTexture.c_str(), playableScale ); 494 505 495 playable.loadMD2Texture( playableTexture ); 506 496 playable.loadModel( playableModel, playableScale ); -
trunk/src/util/signal_handler.cc
r9406 r10114 42 42 catchSignal( SIGSEGV ); 43 43 catchSignal( SIGABRT ); 44 catchSignal( SIGILL ); 44 45 } 45 46 … … 94 95 case SIGABRT: 95 96 sigName = "SIGABRT"; 97 break; 98 case SIGILL: 99 sigName = "SIGILL"; 96 100 break; 97 101 } -
trunk/src/util/singleplayer_shootemup.cc
r9869 r10114 25 25 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);27 28 ObjectListDefinition(SingleplayerShootemup); 29 29 CREATE_FACTORY(SingleplayerShootemup); 30 30 -
trunk/src/world_entities/bsp_entity.cc
r9869 r10114 19 19 #include "loading/resource_manager.h" 20 20 21 #include "class_id_DEPRECATED.h" 22 ObjectListDefinition ID(BspEntity, CL_BSP_ENTITY);21 22 ObjectListDefinition(BspEntity); 23 23 CREATE_FACTORY(BspEntity); 24 24 -
trunk/src/world_entities/creatures/fps_player.cc
r10013 r10114 41 41 42 42 43 #include "class_id_DEPRECATED.h" 44 ObjectListDefinition ID(FPSPlayer, CL_FPS_PLAYER);43 44 ObjectListDefinition(FPSPlayer); 45 45 CREATE_FACTORY(FPSPlayer); 46 46 … … 273 273 { 274 274 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 // else282 // {283 // PRINTF(0)("nothing hit\n");284 // }285 275 } 286 276 287 277 288 278 //dealing damage 289 290 279 if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)) 291 280 { … … 384 373 385 374 // physical falling of the player 386 if( !this->isOnGround())375 if( /*FIXME for testing*/ false && !this->isOnGround()) 387 376 { 388 377 this->fallVelocity += 300.0f * time; … … 404 393 405 394 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())) 407 396 { 408 397 ((InteractiveModel*)this->getModel(0))->tick(time); 409 410 // handle animations differently411 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 // }431 398 } 432 399 -
trunk/src/world_entities/creatures/md2_creature.cc
r10033 r10114 36 36 #include "debug.h" 37 37 38 #include "class_id_DEPRECATED.h" 39 ObjectListDefinition ID(MD2Creature, CL_MD2_CREATURE);38 39 ObjectListDefinition(MD2Creature); 40 40 CREATE_FACTORY(MD2Creature); 41 41 -
trunk/src/world_entities/effects/billboard.cc
r9869 r10114 26 26 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(Billboard, CL_BILLBOARD);28 29 ObjectListDefinition(Billboard); 30 30 CREATE_FACTORY(Billboard); 31 31 -
trunk/src/world_entities/effects/explosion.cc
r9869 r10114 27 27 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(Explosion, CL_EXPLOSION);29 30 ObjectListDefinition(Explosion); 31 31 CREATE_FAST_FACTORY_STATIC(Explosion); 32 32 -
trunk/src/world_entities/effects/lightning_bolt.cc
r9869 r10114 25 25 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(LightningBolt, CL_LIGHTNING_BOLT);27 28 ObjectListDefinition(LightningBolt); 29 29 CREATE_FACTORY(LightningBolt); 30 30 -
trunk/src/world_entities/elements/image_entity.cc
r9869 r10114 30 30 31 31 32 #include "class_id_DEPRECATED.h" 33 ObjectListDefinition ID(ImageEntity, CL_IMAGE_ENTITY);32 33 ObjectListDefinition(ImageEntity); 34 34 CREATE_FACTORY(ImageEntity); 35 35 -
trunk/src/world_entities/elements/text_element.cc
r9869 r10114 27 27 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(TextElement, CL_TEXT_ELEMENT);29 30 ObjectListDefinition(TextElement); 31 31 CREATE_FACTORY(TextElement); 32 32 -
trunk/src/world_entities/environment.cc
r10033 r10114 24 24 #include "util/loading/factory.h" 25 25 26 #include "class_id_DEPRECATED.h" 27 ObjectListDefinition ID(Environment, CL_ENVIRONMENT);26 27 ObjectListDefinition(Environment); 28 28 CREATE_FACTORY(Environment); 29 29 -
trunk/src/world_entities/environments/building.cc
r9869 r10114 23 23 24 24 25 #include "class_id_DEPRECATED.h" 26 ObjectListDefinition ID(Building, CL_BUILDING);25 26 ObjectListDefinition(Building); 27 27 CREATE_FACTORY(Building); 28 28 -
trunk/src/world_entities/environments/mapped_water.cc
r10034 r10114 26 26 #include "resource_shader.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(MappedWater, CL_MAPPED_WATER);28 29 ObjectListDefinition(MappedWater); 30 30 CREATE_FACTORY(MappedWater); 31 31 -
trunk/src/world_entities/environments/model_entity.cc
r9869 r10114 23 23 24 24 25 #include "class_id_DEPRECATED.h" 26 ObjectListDefinition ID(ModelEntity, CL_MODEL_ENTITY);25 26 ObjectListDefinition(ModelEntity); 27 27 CREATE_FACTORY(ModelEntity); 28 28 -
trunk/src/world_entities/environments/water.cc
r9869 r10114 32 32 33 33 34 #include "class_id_DEPRECATED.h" 35 ObjectListDefinition ID(Water, CL_WATER);34 35 ObjectListDefinition(Water); 36 36 CREATE_FACTORY(Water); 37 37 -
trunk/src/world_entities/movie_entity.cc
r9869 r10114 21 21 22 22 23 #include "class_id_DEPRECATED.h" 24 ObjectListDefinition ID(MovieEntity, CL_MOVIE_ENTITY);23 24 ObjectListDefinition(MovieEntity); 25 25 CREATE_FACTORY(MovieEntity); 26 26 -
trunk/src/world_entities/npcs/attractor_mine.cc
r10013 r10114 33 33 #include "effects/explosion.h" 34 34 35 #include "class_id_DEPRECATED.h" 36 ObjectListDefinition ID(AttractorMine, CL_ATTRACTOR_MINE);35 36 ObjectListDefinition(AttractorMine); 37 37 CREATE_FACTORY(AttractorMine); 38 38 #include "script_class.h" -
trunk/src/world_entities/npcs/door.cc
r9869 r10114 26 26 #include "door.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(Door, CL_DOOR);28 29 ObjectListDefinition(Door); 30 30 CREATE_FACTORY(Door); 31 31 -
trunk/src/world_entities/npcs/gate.cc
r9869 r10114 31 31 32 32 33 #include "class_id_DEPRECATED.h" 34 ObjectListDefinition ID(Gate, CL_GATE);33 34 ObjectListDefinition(Gate); 35 35 CREATE_FACTORY(Gate); 36 36 -
trunk/src/world_entities/npcs/generic_npc.cc
r10013 r10114 33 33 #include "bsp_entity.h" 34 34 35 #include "class_id_DEPRECATED.h" 36 ObjectListDefinition ID(GenericNPC, CL_GENERIC_NPC);35 36 ObjectListDefinition(GenericNPC); 37 37 CREATE_FACTORY(GenericNPC); 38 38 -
trunk/src/world_entities/npcs/ground_turret.cc
r9869 r10114 29 29 #include "effects/explosion.h" 30 30 31 #include "class_id_DEPRECATED.h"32 31 33 ObjectListDefinitionID(GroundTurret, CL_GROUND_TURRET); 32 33 ObjectListDefinition(GroundTurret); 34 34 CREATE_FACTORY(GroundTurret); 35 35 -
trunk/src/world_entities/npcs/network_turret.cc
r9869 r10114 32 32 #include "debug.h" 33 33 34 #include "class_id_DEPRECATED.h" 35 ObjectListDefinition ID(NetworkTurret, CL_NETWORK_TURRET);34 35 ObjectListDefinition(NetworkTurret); 36 36 CREATE_FACTORY(NetworkTurret); 37 37 -
trunk/src/world_entities/npcs/npc_test.cc
r9869 r10114 30 30 #include "effects/explosion.h" 31 31 32 #include "class_id_DEPRECATED.h" 33 ObjectListDefinition ID(NPC2, CL_NPC_TEST2);32 33 ObjectListDefinition(NPC2); 34 34 CREATE_FACTORY(NPC2); 35 35 -
trunk/src/world_entities/npcs/repair_station.cc
r9869 r10114 26 26 #include "repair_station.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(RepairStation, CL_DOOR +1);28 29 ObjectListDefinition(RepairStation); 30 30 CREATE_FACTORY(RepairStation); 31 31 -
trunk/src/world_entities/npcs/space_turret.cc
r9869 r10114 29 29 #include "effects/explosion.h" 30 30 31 #include "class_id_DEPRECATED.h" 32 ObjectListDefinition ID(SpaceTurret, CL_SPACE_TURRET);31 32 ObjectListDefinition(SpaceTurret); 33 33 CREATE_FACTORY(SpaceTurret); 34 34 -
trunk/src/world_entities/particles/box_emitter.cc
r9869 r10114 24 24 #include "debug.h" 25 25 26 #include "class_id_DEPRECATED.h"27 26 28 ObjectListDefinitionID(BoxEmitter, CL_BOX_EMITTER); 27 28 ObjectListDefinition(BoxEmitter); 29 29 CREATE_FACTORY(BoxEmitter); 30 30 -
trunk/src/world_entities/particles/dot_emitter.cc
r9869 r10114 26 26 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(DotEmitter, CL_DOT_EMITTER);28 29 ObjectListDefinition(DotEmitter); 30 30 CREATE_FACTORY(DotEmitter); 31 31 -
trunk/src/world_entities/particles/dot_particles.cc
r9869 r10114 23 23 #include "state.h" 24 24 25 #include "class_id_DEPRECATED.h"26 25 27 ObjectListDefinitionID(DotParticles, CL_DOT_PARTICLES); 26 27 ObjectListDefinition(DotParticles); 28 28 CREATE_FACTORY(DotParticles); 29 29 -
trunk/src/world_entities/particles/model_particles.cc
r9869 r10114 25 25 #include "debug.h" 26 26 27 #include "class_id_DEPRECATED.h"28 27 29 ObjectListDefinitionID(ModelParticles, CL_MODEL_PARTICLES); 28 29 ObjectListDefinition(ModelParticles); 30 30 CREATE_FACTORY(ModelParticles); 31 31 -
trunk/src/world_entities/particles/plane_emitter.cc
r9869 r10114 24 24 #include "debug.h" 25 25 26 #include "class_id_DEPRECATED.h"27 26 28 ObjectListDefinitionID(PlaneEmitter, CL_PLANE_EMITTER); 27 28 ObjectListDefinition(PlaneEmitter); 29 29 CREATE_FACTORY(PlaneEmitter); 30 30 -
trunk/src/world_entities/particles/spark_particles.cc
r9869 r10114 24 24 #include "shell_command.h" 25 25 26 #include "class_id_DEPRECATED.h"27 26 28 ObjectListDefinitionID(SparkParticles, CL_SPARK_PARTICLES); 27 28 ObjectListDefinition(SparkParticles); 29 29 CREATE_FACTORY(SparkParticles); 30 30 -
trunk/src/world_entities/particles/sprite_particles.cc
r9869 r10114 24 24 #include "shell_command.h" 25 25 26 #include "class_id_DEPRECATED.h"27 26 28 ObjectListDefinitionID(SpriteParticles, CL_SPRITE_PARTICLES); 27 28 ObjectListDefinition(SpriteParticles); 29 29 CREATE_FACTORY(SpriteParticles); 30 30 -
trunk/src/world_entities/planet.cc
r9869 r10114 32 32 #include "debug.h" 33 33 34 #include "class_id_DEPRECATED.h" 35 ObjectListDefinition ID(Planet, CL_PLANET);34 35 ObjectListDefinition(Planet); 36 36 CREATE_FACTORY(Planet); 37 37 -
trunk/src/world_entities/power_ups/laser_power_up.cc
r9869 r10114 24 24 25 25 26 #include "class_id_DEPRECATED.h" 27 ObjectListDefinition ID(LaserPowerUp, CL_LASER_POWER_UP);26 27 ObjectListDefinition(LaserPowerUp); 28 28 CREATE_FACTORY(LaserPowerUp); 29 29 … … 80 80 { 81 81 // 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())) 83 83 this->toList(OM_DEAD); 84 84 } -
trunk/src/world_entities/power_ups/param_power_up.cc
r9869 r10114 27 27 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(ParamPowerUp, CL_PARAM_POWER_UP);29 30 ObjectListDefinition(ParamPowerUp); 31 31 CREATE_FACTORY(ParamPowerUp); 32 32 -
trunk/src/world_entities/power_ups/turret_power_up.cc
r9869 r10114 24 24 25 25 26 #include "class_id_DEPRECATED.h" 27 ObjectListDefinition ID(TurretPowerUp, CL_TURRET_POWER_UP);26 27 ObjectListDefinition(TurretPowerUp); 28 28 CREATE_FACTORY(TurretPowerUp); 29 29 … … 76 76 { 77 77 // 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())) 79 79 this->toList(OM_DEAD); 80 80 } -
trunk/src/world_entities/power_ups/weapon_power_up.cc
r9869 r10114 27 27 #include "debug.h" 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(WeaponPowerUp, CL_WEAPON_POWER_UP);29 30 ObjectListDefinition(WeaponPowerUp); 31 31 CREATE_FACTORY(WeaponPowerUp); 32 32 -
trunk/src/world_entities/projectiles/bomb.cc
r9869 r10114 25 25 #include "debug.h" 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(Bomb, CL_BOMB);27 28 ObjectListDefinition(Bomb); 29 29 CREATE_FAST_FACTORY_STATIC(Bomb); 30 30 … … 166 166 void Bomb::collidesWith (WorldEntity* entity, const Vector& location) 167 167 { 168 if (this->lifeCycle < .9f && entity->isA( CL_NPC))168 if (this->lifeCycle < .9f && entity->isA( "NPC" )) 169 169 this->lifeCycle = 0.9f; 170 170 } -
trunk/src/world_entities/projectiles/boomerang_projectile.cc
r9869 r10114 26 26 #include "debug.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(BoomerangProjectile, CL_BOOMERANG_PROJECTILE);28 29 ObjectListDefinition(BoomerangProjectile); 30 30 CREATE_FAST_FACTORY_STATIC(BoomerangProjectile); 31 31 -
trunk/src/world_entities/projectiles/guided_missile.cc
r9869 r10114 25 25 #include "debug.h" 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(GuidedMissile, CL_GUIDED_MISSILE);27 28 ObjectListDefinition(GuidedMissile); 29 29 CREATE_FAST_FACTORY_STATIC(GuidedMissile); 30 30 -
trunk/src/world_entities/projectiles/hyperblast.cc
r9869 r10114 25 25 #include "debug.h" 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(Hyperblast, CL_HYPERBLAST);27 28 ObjectListDefinition(Hyperblast); 29 29 CREATE_FAST_FACTORY_STATIC(Hyperblast); 30 30 -
trunk/src/world_entities/projectiles/laser.cc
r9869 r10114 28 28 29 29 30 #include "class_id_DEPRECATED.h" 30 31 31 ObjectListDefinition(Laser); 32 32 CREATE_FAST_FACTORY_STATIC(Laser); … … 107 107 void Laser::collidesWith(WorldEntity* entity, const Vector& location) 108 108 { 109 if (this->hitEntity != entity && entity->isA( CL_NPC))109 if (this->hitEntity != entity && entity->isA( "NPC" )) 110 110 this->destroy( entity ); 111 111 this->hitEntity = entity; -
trunk/src/world_entities/projectiles/rail_projectile.cc
r9869 r10114 28 28 29 29 30 #include "class_id_DEPRECATED.h" 31 ObjectListDefinition ID(RailProjectile, CL_RAIL_PROJECTILE);30 31 ObjectListDefinition(RailProjectile); 32 32 CREATE_FAST_FACTORY_STATIC(RailProjectile); 33 33 … … 106 106 void RailProjectile::collidesWith(WorldEntity* entity, const Vector& location) 107 107 { 108 if (this->hitEntity != entity && entity->isA( CL_NPC))108 if (this->hitEntity != entity && entity->isA( "NPC" )) 109 109 this->destroy( entity ); 110 110 this->hitEntity = entity; -
trunk/src/world_entities/projectiles/rocket.cc
r9869 r10114 25 25 #include "debug.h" 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(Rocket, CL_ROCKET);27 28 ObjectListDefinition(Rocket); 29 29 CREATE_FAST_FACTORY_STATIC(Rocket); 30 30 -
trunk/src/world_entities/projectiles/test_bullet.cc
r9869 r10114 24 24 #include "debug.h" 25 25 26 #include "class_id_DEPRECATED.h" 27 ObjectListDefinition ID(TestBullet, CL_TEST_BULLET);26 27 ObjectListDefinition(TestBullet); 28 28 CREATE_FAST_FACTORY_STATIC(TestBullet); 29 29 … … 119 119 void TestBullet::collidesWith(WorldEntity* entity, const Vector& location) 120 120 { 121 if (this->hitEntity != entity && entity->isA( CL_NPC))121 if (this->hitEntity != entity && entity->isA( "NPC" )) 122 122 this->destroy( entity ); 123 123 this->hitEntity = entity; -
trunk/src/world_entities/recorder.cc
r9869 r10114 21 21 #include "debug.h" 22 22 23 #include "class_id_DEPRECATED.h" 24 ObjectListDefinition ID(Recorder, CL_RECORDER);23 24 ObjectListDefinition(Recorder); 25 25 CREATE_FACTORY(Recorder); 26 26 -
trunk/src/world_entities/skybox.cc
r9869 r10114 31 31 #include "debug.h" 32 32 33 #include "class_id_DEPRECATED.h" 34 ObjectListDefinition ID(SkyBox, CL_SKYBOX);33 34 ObjectListDefinition(SkyBox); 35 35 CREATE_FACTORY(SkyBox); 36 36 -
trunk/src/world_entities/space_ships/collision_probe.cc
r9869 r10114 24 24 25 25 26 #include "class_id_DEPRECATED.h" 27 ObjectListDefinition ID(CollisionProbe, CL_COLLISION_PROBE);26 27 ObjectListDefinition(CollisionProbe); 28 28 29 29 CREATE_FACTORY(CollisionProbe); -
trunk/src/world_entities/space_ships/cruizer.cc
r9869 r10114 34 34 #include "debug.h" 35 35 36 #include "class_id_DEPRECATED.h" 37 ObjectListDefinition ID(Cruizer, CL_CRUIZER);36 37 ObjectListDefinition(Cruizer); 38 38 CREATE_FACTORY(Cruizer); 39 39 -
trunk/src/world_entities/space_ships/helicopter.cc
r9869 r10114 34 34 #include "debug.h" 35 35 36 #include "class_id_DEPRECATED.h" 37 ObjectListDefinition ID(Helicopter, CL_HELICOPTER);36 37 ObjectListDefinition(Helicopter); 38 38 CREATE_FACTORY(Helicopter); 39 39 #include "script_class.h" -
trunk/src/world_entities/space_ships/hover.cc
r9869 r10114 34 34 #include "debug.h" 35 35 36 #include "class_id_DEPRECATED.h" 37 ObjectListDefinition ID(Hover, CL_HOVER);36 37 ObjectListDefinition(Hover); 38 38 CREATE_FACTORY(Hover); 39 39 -
trunk/src/world_entities/space_ships/space_ship.cc
r9869 r10114 53 53 54 54 55 #include "class_id_DEPRECATED.h" 56 ObjectListDefinition ID(SpaceShip, CL_SPACE_SHIP);55 56 ObjectListDefinition(SpaceShip); 57 57 CREATE_FACTORY(SpaceShip); 58 58 -
trunk/src/world_entities/space_ships/spacecraft_2d.cc
r10013 r10114 38 38 39 39 40 #include "class_id_DEPRECATED.h" 41 ObjectListDefinition ID(Spacecraft2D, CL_SPACECRAFT_2D);40 41 ObjectListDefinition(Spacecraft2D); 42 42 CREATE_FACTORY(Spacecraft2D); 43 43 -
trunk/src/world_entities/space_ships/turbine_hover.cc
r9869 r10114 34 34 #include "debug.h" 35 35 36 #include "class_id_DEPRECATED.h" 37 ObjectListDefinition ID(TurbineHover, CL_TURBINE_HOVER);36 37 ObjectListDefinition(TurbineHover); 38 38 CREATE_FACTORY(TurbineHover); 39 39 -
trunk/src/world_entities/spawning_point.cc
r9869 r10114 33 33 #include "converter.h" 34 34 35 #include "class_id_DEPRECATED.h" 36 ObjectListDefinition ID(SpawningPoint, CL_SPAWNING_POINT);35 36 ObjectListDefinition(SpawningPoint); 37 37 CREATE_FACTORY( SpawningPoint); 38 38 /** -
trunk/src/world_entities/spectator.cc
r10108 r10114 22 22 #include "shared_network_data.h" 23 23 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 28 ObjectListDefinition(Spectator); 26 29 CREATE_FACTORY(Spectator); 27 30 … … 83 86 registerEvent(KeyMapper::PEV_RIGHT); 84 87 registerEvent(KeyMapper::PEV_FIRE1); 88 registerEvent(KeyMapper::PEV_JUMP); 85 89 registerEvent(EV_MOUSE_MOTION); 86 90 … … 233 237 this->yMouse += event.yRel; 234 238 } 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 34 34 #include "debug.h" 35 35 36 #include "class_id_DEPRECATED.h" 37 ObjectListDefinition ID(Terrain, CL_TERRAIN);36 37 ObjectListDefinition(Terrain); 38 38 CREATE_FACTORY(Terrain); 39 39 -
trunk/src/world_entities/test_entity.cc
r9928 r10114 33 33 34 34 35 #include "class_id_DEPRECATED.h" 35 36 36 ObjectListDefinition(TestEntity); 37 37 CREATE_FACTORY(TestEntity); -
trunk/src/world_entities/weapons/aiming_turret.cc
r9869 r10114 27 27 #include "util/loading/factory.h" 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(AimingTurret, CL_AIMING_TURRET);29 30 ObjectListDefinition(AimingTurret); 31 31 CREATE_FACTORY(AimingTurret); 32 32 -
trunk/src/world_entities/weapons/boomerang_gun.cc
r9869 r10114 27 27 #include "util/loading/factory.h" 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(BoomerangGun, CL_BOOMERANG_GUN);29 30 ObjectListDefinition(BoomerangGun); 31 31 CREATE_FACTORY(BoomerangGun); 32 32 -
trunk/src/world_entities/weapons/cannon.cc
r9869 r10114 36 36 37 37 38 #include "class_id_DEPRECATED.h" 39 ObjectListDefinition ID(Cannon, CL_CANNON);38 39 ObjectListDefinition(Cannon); 40 40 CREATE_FACTORY(Cannon); 41 41 -
trunk/src/world_entities/weapons/fps_sniper_rifle.cc
r9869 r10114 39 39 40 40 41 #include "class_id_DEPRECATED.h" 42 ObjectListDefinition ID(FPSSniperRifle, CL_FPS_SNIPER_RIFLE);41 42 ObjectListDefinition(FPSSniperRifle); 43 43 CREATE_FACTORY(FPSSniperRifle); 44 44 -
trunk/src/world_entities/weapons/hyperblaster.cc
r9869 r10114 35 35 36 36 37 #include "class_id_DEPRECATED.h" 38 ObjectListDefinition ID(Hyperblaster, CL_HYPERBLASTER);37 38 ObjectListDefinition(Hyperblaster); 39 39 CREATE_FACTORY(Hyperblaster); 40 40 -
trunk/src/world_entities/weapons/laser_cannon.cc
r9869 r10114 31 31 #include "loading/fast_factory.h" 32 32 33 #include "class_id_DEPRECATED.h" 34 ObjectListDefinition ID(LaserCannon, CL_LASER_CANNON);33 34 ObjectListDefinition(LaserCannon); 35 35 CREATE_FACTORY(LaserCannon); 36 36 -
trunk/src/world_entities/weapons/targeting_turret.cc
r9869 r10114 26 26 #include "util/loading/factory.h" 27 27 28 #include "class_id_DEPRECATED.h" 29 ObjectListDefinition ID(TargetingTurret, CL_TARGETING_TURRET);28 29 ObjectListDefinition(TargetingTurret); 30 30 CREATE_FACTORY(TargetingTurret); 31 31 -
trunk/src/world_entities/weapons/test_gun.cc
r9869 r10114 33 33 #include "loading/fast_factory.h" 34 34 35 #include "class_id_DEPRECATED.h" 36 ObjectListDefinition ID(TestGun, CL_TEST_GUN);35 36 ObjectListDefinition(TestGun); 37 37 CREATE_FACTORY(TestGun); 38 38 /** -
trunk/src/world_entities/weapons/turret.cc
r9869 r10114 27 27 #include "util/loading/factory.h" 28 28 29 #include "class_id_DEPRECATED.h" 30 ObjectListDefinition ID(Turret, CL_TURRET);29 30 ObjectListDefinition(Turret); 31 31 CREATE_FACTORY(Turret); 32 32 -
trunk/src/world_entities/weather_effects/cloud_effect.cc
r10034 r10114 30 30 #include "resource_shader.h" 31 31 32 #include "class_id_DEPRECATED.h" 32 33 33 34 34 Vector CloudEffect::cloudColor; … … 41 41 float CloudEffect::fadeTime; 42 42 43 ObjectListDefinition ID(CloudEffect, CL_CLOUD_EFFECT);43 ObjectListDefinition(CloudEffect); 44 44 45 45 -
trunk/src/world_entities/weather_effects/fog_effect.cc
r9869 r10114 30 30 SHELL_COMMAND(fadeout, FogEffect, fadeOutFog); 31 31 32 #include "class_id_DEPRECATED.h" 32 33 33 34 34 CREATE_SCRIPTABLE_CLASS(FogEffect, -
trunk/src/world_entities/weather_effects/lense_flare.cc
r9869 r10114 34 34 #include "camera.h" 35 35 36 #include "class_id_DEPRECATED.h" 37 38 ObjectListDefinition ID(LenseFlare, CL_LENSE_FLARE);36 37 38 ObjectListDefinition(LenseFlare); 39 39 CREATE_FACTORY(LenseFlare); 40 40 -
trunk/src/world_entities/weather_effects/lightning_effect.cc
r9869 r10114 28 28 #include "script_class.h" 29 29 #include "debug.h" 30 #include "class_id_DEPRECATED.h" 31 32 ObjectListDefinition ID(LightningEffect, CL_LIGHTNING_EFFECT);30 31 32 ObjectListDefinition(LightningEffect); 33 33 34 34 SHELL_COMMAND(activate, LightningEffect, activateLightning); -
trunk/src/world_entities/weather_effects/rain_effect.cc
r9869 r10114 32 32 #include "debug.h" 33 33 34 #include "class_id_DEPRECATED.h" 35 36 ObjectListDefinition ID(RainEffect, CL_RAIN_EFFECT);34 35 36 ObjectListDefinition(RainEffect); 37 37 38 38 // Define shell commands -
trunk/src/world_entities/weather_effects/snow_effect.cc
r9869 r10114 30 30 #include "cloud_effect.h" 31 31 32 #include "class_id_DEPRECATED.h" 33 34 ObjectListDefinition ID(SnowEffect, CL_SNOW_EFFECT);32 33 34 ObjectListDefinition(SnowEffect); 35 35 SHELL_COMMAND(activate, SnowEffect, activateSnow); 36 36 SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow); -
trunk/src/world_entities/weather_effects/volfog_effect.cc
r9869 r10114 49 49 50 50 51 #include "class_id_DEPRECATED.h" 52 ObjectListDefinition ID(VolFogEffect, CL_VOLFOG_EFFECT);51 52 ObjectListDefinition(VolFogEffect); 53 53 CREATE_FACTORY(VolFogEffect); 54 54
Note: See TracChangeset
for help on using the changeset viewer.