- Timestamp:
- Feb 5, 2006, 11:54:39 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r7033 r7036 32 32 lib/graphics/effects/fog_effect.cc \ 33 33 lib/graphics/effects/lense_flare.cc \ 34 \ 35 util/multiplayer_team_deathmatch.cc \ 34 36 \ 35 37 subprojects/benchmark.cc -
trunk/src/story_entities/game_world_data.cc
r7035 r7036 15 15 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD 17 18 #include <fstream> 19 #include <iostream> 17 20 18 21 #include "game_world_data.h" … … 365 368 void GameWorldData::loadGameRule(const TiXmlElement* root) 366 369 { 367 368 const TiXmlElement* element = root->FirstChildElement("GameRule"); 369 370 if( element == NULL) 371 { 372 PRINTF(1)("GameWorld is missing 'GameRule'\n"); 373 } 374 else 375 { 376 element = element->FirstChildElement(); 377 378 while( element != NULL) 370 const TiXmlElement* element = root->FirstChildElement(); 371 while( element != NULL) 372 { 373 PRINTF(4)("creating %s\n", element->Value()); 374 BaseObject* created = Factory::fabricate(element); 375 if (created != NULL /*&& created->isA(CL_GAME_RULES)*/) 379 376 { 380 BaseObject* created = Factory::fabricate(element); 381 if (created == NULL /*|| !created->isA(CL_GAME_RULE)*/) 382 delete created; 383 else 384 { 385 this->gameRule = dynamic_cast<GameRules*>(created); 386 element = element->NextSiblingElement(); 387 } 377 this->gameRule = dynamic_cast<GameRules*>(created); 388 378 } 389 } 390 391 392 393 } 394 395 396 379 else 380 { 381 PRINTF(1)("Could not create a %s\n", element->Value()); 382 delete created; 383 } 384 element = element->NextSiblingElement(); 385 } 386 } 387 388 389
Note: See TracChangeset
for help on using the changeset viewer.