Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6720 in orxonox.OLD


Ignore:
Timestamp:
Jan 25, 2006, 5:08:23 PM (18 years ago)
Author:
bensch
Message:

trunk: bug in loadModel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/world_entity.cc

    r6700 r6720  
    135135      strcpy(lodFile, fileName);
    136136      char* depth = strchr(lodFile, '#');
    137       for (unsigned int i = 0; i < 5; i++)
     137      for (unsigned int i = 0; i < 3; i++)
    138138      {
    139139        *depth = 48+(int)i;
    140         printf("-------%s\n", lodFile);
    141140        if (ResourceManager::isInDataDir(lodFile))
    142141          this->loadModel(lodFile, scaling, i);
     
    144143      return;
    145144    }
    146     if (scaling == 0.0)
    147     {
    148       scaling = 1.0;
     145    if (this->scaling <= 0.0)
     146    {
     147      this->scaling = 1.0;
    149148      PRINTF(1)("YOU GAVE ME A CRAPY SCALE resetting to 1\n");
    150149    }
     
    152151    {
    153152      PRINTF(4)("fetching OBJ file: %s\n", fileName);
    154       if (scaling == 1.0)
     153      if (this->scaling == 1.0)
    155154        this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN), modelNumber);
    156155      else
    157         this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling), modelNumber);
     156        this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, this->scaling), modelNumber);
    158157
    159158      if( modelNumber == 0)
Note: See TracChangeset for help on using the changeset viewer.