Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2006, 10:51:08 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/new_class_id: new_class ID working, adapdet many classes, and reinvented some of the ClassID stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/world_entities/terrain.cc

    r9406 r9709  
    3434
    3535
    36 
    37 CREATE_FACTORY(Terrain, CL_TERRAIN);
     36#include "class_id.h"
     37NewObjectListDefinitionID(Terrain, CL_TERRAIN);
     38CREATE_FACTORY(Terrain);
    3839
    3940/**
     
    8990{
    9091  if (objectList)
    91     glDeleteLists(this->objectList, 1);
     92    glDeleteLists(this->modelList, 1);
    9293  if( this->ssp)
    9394    delete ssp;
     
    104105void Terrain::init()
    105106{
    106   this->setClassID(CL_TERRAIN, "Terrain");
     107  this->registerObject(this, Terrain::_objectList);
    107108  this->toList(OM_ENVIRON_NOTICK);
    108109  this->toReflectionList();
    109110
    110   this->objectList = 0;
     111  this->modelList = 0;
    111112  this->ssp = NULL;
    112113  this->vegetation = NULL;
     
    207208
    208209  if (this->objectList)
    209     glCallList(this->objectList);
     210    glCallList(this->modelList);
    210211  else if (this->getModel())
    211212    this->getModel()->draw();
     
    256257  if (debugTerrain == TERRAIN_DAVE)
    257258  {
    258     objectList = glGenLists(1);
    259     glNewList (objectList, GL_COMPILE);
     259    modelList = glGenLists(1);
     260    glNewList (modelList, GL_COMPILE);
    260261
    261262    glColor3f(1.0,0,0);
Note: See TracChangeset for help on using the changeset viewer.