Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6167 in orxonox.OLD for branches/christmas_branche


Ignore:
Timestamp:
Dec 19, 2005, 11:37:06 PM (19 years ago)
Author:
patrick
Message:

christmas: md2 model loading issues

Location:
branches/christmas_branche/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/lib/event/event_handler.cc

    r6054 r6167  
    259259{
    260260  this->eventsGrabbed = grabEvents;
    261   if(!grabEvents)
    262     SDL_WM_GrabInput(SDL_GRAB_OFF);
    263   else
    264     SDL_WM_GrabInput(SDL_GRAB_ON);
     261//   if(!grabEvents)
     262//     SDL_WM_GrabInput(SDL_GRAB_OFF);
     263//   else
     264//     SDL_WM_GrabInput(SDL_GRAB_ON);
    265265}
    266266
  • branches/christmas_branche/src/world_entities/creatures/md2_creature.cc

    r6166 r6167  
    3636using namespace std;
    3737
    38 CREATE_FACTORY(MD2Creature, CL_SPACE_SHIP);
     38CREATE_FACTORY(MD2Creature, CL_MD2_CREATURE);
    3939
    4040/**
     
    141141  this->registerEvent(KeyMapper::PEV_NEXT_WEAPON);
    142142  this->registerEvent(KeyMapper::PEV_PREVIOUS_WEAPON);
    143   this->registerEvent(SDLK_PAGEUP);
    144   this->registerEvent(SDLK_PAGEDOWN);
    145143  this->registerEvent(EV_MOUSE_MOTION);
    146144
  • branches/christmas_branche/src/world_entities/world_entity.cc

    r6142 r6167  
    120120      }
    121121
    122     PRINTF(4)("fetching %s\n", fileName);
    123     if (scaling == 1.0)
    124       this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN), modelNumber);
    125     else
    126       this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling), modelNumber);
    127     if (modelNumber == 0)
    128     this->buildObbTree(4);
     122      if( strchr(fileName, '.obj') != NULL)
     123      {
     124        PRINTF(4)("fetching OBJ file: %s\n", fileName);
     125        if (scaling == 1.0)
     126          this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN), modelNumber);
     127        else
     128          this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling), modelNumber);
     129
     130        if( modelNumber == 0)
     131          this->buildObbTree(4);
     132      }
     133      else if( strchr(fileName, '.md2') != NULL)
     134      {
     135        PRINTF(4)("fetching MD2 file: %s\n", fileName);
     136        this->setModel((Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN), 0);
     137      }
    129138  }
    130139  else
Note: See TracChangeset for help on using the changeset viewer.