- Timestamp:
- Jan 6, 2006, 7:11:34 PM (19 years ago)
- Location:
- branches/network/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/power_ups/param_power_up.cc
r6420 r6421 129 129 SYNCHELP_READ_FKT( PowerUp::writeState ); 130 130 131 int i; 132 SYNCHELP_READ_INT( i ); 133 this->type = (EnumParamPowerUpType)i; 134 SYNCHELP_READ_INT( this->value ); 135 136 if ( this->value != 0 ) 137 { 138 SYNCHELP_READ_INT( this->min_value ); 139 SYNCHELP_READ_INT( this->max_value ); 140 } 141 131 142 return SYNCHELP_READ_N; 132 143 } … … 151 162 SYNCHELP_WRITE_FKT( PowerUp::readState ); 152 163 164 int i = this->type; 165 SYNCHELP_WRITE_INT( i ); 166 SYNCHELP_WRITE_INT( this->value ); 167 168 if ( this->value != 0 ) 169 { 170 SYNCHELP_WRITE_INT( this->min_value ); 171 SYNCHELP_WRITE_INT( this->max_value ); 172 } 173 153 174 return SYNCHELP_WRITE_N; 154 175 } -
branches/network/src/world_entities/world_entity.cc
r6419 r6421 49 49 50 50 this->obbTree = NULL; 51 52 this->md2TextureFileName = NULL; 51 53 52 54 if (root != NULL) … … 384 386 SYNCHELP_READ_FLOAT( scaling ); 385 387 //check if modelFileName is relative to datadir or absolute 386 if ( strstr(modelFileName, ResourceManager::getInstance()->getDataDir()) ) 387 { 388 loadModel( modelFileName+strlen(ResourceManager::getInstance()->getDataDir()), scaling ); 389 } 390 else 391 { 392 loadModel( modelFileName, scaling ); 388 389 if ( strcmp(modelFileName, "") ) 390 { 391 392 if ( strstr(modelFileName, ResourceManager::getInstance()->getDataDir()) ) 393 { 394 loadModel( modelFileName+strlen(ResourceManager::getInstance()->getDataDir()), scaling ); 395 } 396 else 397 { 398 loadModel( modelFileName, scaling ); 399 } 393 400 } 394 401 delete[] modelFileName; 402 403 SYNCHELP_READ_STRINGM( modelFileName ); 404 if ( strcmp(modelFileName, "") ) 405 this->md2TextureFileName = modelFileName; 395 406 396 407 return SYNCHELP_READ_N; … … 411 422 SYNCHELP_WRITE_STRING( getModel( 0 )->getName() ); 412 423 SYNCHELP_WRITE_FLOAT( scaling ); 424 if ( this->md2TextureFileName!=NULL && strcmp(this->md2TextureFileName, "") ) 425 { 426 SYNCHELP_WRITE_STRING(this->md2TextureFileName); 427 } 428 else 429 { 430 SYNCHELP_WRITE_STRING(""); 431 } 432 413 433 return SYNCHELP_WRITE_N; 414 434 }
Note: See TracChangeset
for help on using the changeset viewer.