Changeset 6341 in orxonox.OLD for trunk/src/world_entities/terrain.cc
- Timestamp:
- Dec 30, 2005, 1:57:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/terrain.cc
r6142 r6341 24 24 #include "resource_manager.h" 25 25 #include "model.h" 26 #include "network_game_manager.h" 27 26 28 27 29 #include "glincl.h" … … 111 113 void Terrain::loadVegetation(const char* vegetationFile) 112 114 { 115 PRINTF(0)("loadVegetation: %s\n", vegetationFile); 113 116 if (this->vegetation) 114 117 ResourceManager::getInstance()->unload(this->vegetation, RP_LEVEL); … … 116 119 { 117 120 PRINTF(4)("fetching %s\n", vegetationFile); 118 121 this->vegetation = (Model*)ResourceManager::getInstance()->load(vegetationFile, OBJ, RP_CAMPAIGN); 119 122 } 120 123 else … … 315 318 } 316 319 } 320 321 int Terrain::writeBytes( const byte * data, int length, int sender ) 322 { 323 setRequestedSync( false ); 324 setIsOutOfSync( false ); 325 326 SYNCHELP_READ_BEGIN(); 327 SYNCHELP_READ_FKT( WorldEntity::writeState ); 328 329 return SYNCHELP_READ_N; 330 } 331 332 int Terrain::readBytes( byte * data, int maxLength, int * reciever ) 333 { 334 if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() ) 335 { 336 (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() ); 337 setRequestedSync( true ); 338 } 339 340 int rec = this->getRequestSync(); 341 if ( rec > 0 ) 342 { 343 *reciever = rec; 344 345 return WorldEntity::readState( data, maxLength ); 346 347 } 348 349 *reciever = 0; 350 return 0; 351 } 352 353 void Terrain::writeDebug( ) const 354 { 355 } 356 357 void Terrain::readDebug( ) const 358 { 359 }
Note: See TracChangeset
for help on using the changeset viewer.