Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 24, 2007, 12:18:01 AM (18 years ago)
Author:
patrick
Message:

file is now loadable over the world xml file, including loading of model details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/world_entities/world_entity.cc

    r10312 r10313  
    145145  .defaultValues("", 1.0f, 0);
    146146
     147  LoadParam(root, "mountpoints", this, WorldEntity, loadMountPoints)
     148  .describe("the fileName of the object information file (optional)");
     149
    147150  LoadParam(root, "maxHealth", this, WorldEntity, setHealthMax)
    148151  .describe("The Maximum health that can be loaded onto this entity")
     
    216219        {
    217220          this->buildObbTree(obbTreeDepth);
    218 
    219           // now get the object information file for this model, if any
    220           std::string oifName = fileName.substr(0, fileName.length() - 4) + ".oif";
    221           this->loadMountPoints( model, oifName);
    222221        }
    223222      }
     
    277276 * @param fileName the name of the file
    278277 */
    279 void WorldEntity::loadMountPoints( Model* model, const std::string& fileName)
     278void WorldEntity::loadMountPoints(const std::string& fileName)
    280279{
    281280  PRINTF(5)("loading the oif File: %s\n", fileName.c_str());
     
    283282  // now load the object information file
    284283  this->oiFile = new ObjectInformationFile(fileName);
     284
     285  // get the model to load
     286  Model* model = this->getModel();
    285287
    286288  // extract the mount points
Note: See TracChangeset for help on using the changeset viewer.