Changeset 7230 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Mar 21, 2006, 3:20:36 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/skybox.cc
r7221 r7230 300 300 textureName = ""; 301 301 } 302 char*texName;303 SYNCHELP_READ_STRING M( texName, NWT_SB_TEXTURENAME );302 std::string texName; 303 SYNCHELP_READ_STRING( texName, NWT_SB_TEXTURENAME ); 304 304 305 305 this->setSize( size ); … … 330 330 331 331 SYNCHELP_WRITE_FLOAT(this->size, NWT_SB_SIZE); 332 SYNCHELP_WRITE_STRING(this->textureName .c_str(), NWT_SB_TEXTURENAME);332 SYNCHELP_WRITE_STRING(this->textureName, NWT_SB_TEXTURENAME); 333 333 334 334 return SYNCHELP_WRITE_N; -
trunk/src/world_entities/world_entity.cc
r7221 r7230 519 519 int WorldEntity::writeState( const byte * data, int length, int sender ) 520 520 { 521 char*modelFileName;521 std::string modelFileName; 522 522 SYNCHELP_READ_BEGIN(); 523 523 524 524 SYNCHELP_READ_FKT( PNode::writeState, NWT_WE_PN_WRITESTATE ); 525 525 526 SYNCHELP_READ_STRING M( modelFileName, NWT_WE_PN_MODELFILENAME );526 SYNCHELP_READ_STRING( modelFileName, NWT_WE_PN_MODELFILENAME ); 527 527 SYNCHELP_READ_FLOAT( scaling, NWT_WE_PN_SCALING ); 528 528 //check if modelFileName is relative to datadir or absolute 529 529 530 530 531 PRINTF(0)("================ LOADING MODEL %s, %f\n", modelFileName , scaling);532 533 if ( strcmp(modelFileName, ""))531 PRINTF(0)("================ LOADING MODEL %s, %f\n", modelFileName.c_str(), scaling); 532 533 if ( modelFileName != "" ) 534 534 { 535 535 loadModel( modelFileName, scaling); 536 536 PRINTF(0)("modelfilename: %s\n", getModel( 0 )->getName()); 537 537 } 538 delete[] modelFileName;539 538 540 539 /*SYNCHELP_READ_STRINGM( modelFileName ); … … 568 567 SYNCHELP_WRITE_FKT( PNode::readState, NWT_WE_PN_WRITESTATE ); 569 568 570 if ( getModel(0) && getModel(0)->getName() )571 { 572 char* name = (char*)(getModel( 0 )->getName());573 574 if ( ResourceManager::getInstance()->getDataDir() == name ) /// FIXME (do not know what to do here.)575 { 576 name += ResourceManager::getInstance()->getDataDir().size();569 if ( getModel(0) && getModel(0)->getName() != "" ) 570 { 571 std::string name = getModel( 0 )->getName(); 572 573 if ( name.find( ResourceManager::getInstance()->getDataDir() ) == 0 ) 574 { 575 name.erase(ResourceManager::getInstance()->getDataDir().size()); 577 576 } 578 577
Note: See TracChangeset
for help on using the changeset viewer.