Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2007, 12:04:49 AM (16 years ago)
Author:
scheusso
Message:

made Model and WorldEntity synchronisable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/Model.cc

    r622 r630  
    1515    {
    1616        RegisterObject(Model);
     17        registerAllVariables();
    1718    }
    1819
     
    2728        if (xmlElem->Attribute("mesh"))
    2829        {
    29             std::string src = xmlElem->Attribute("mesh");
    30             this->mesh_.setMesh(src);
    31             this->attachObject(this->mesh_.getEntity());
     30            meshSrc_ = xmlElem->Attribute("mesh");
    3231        }
     32    }
     33   
     34    bool Model::create(){
     35      this->mesh_.setMesh(meshSrc_);
     36      this->attachObject(this->mesh_.getEntity());
    3337
    34         COUT(4) << "Loader: Created model" << std::endl;
     38      COUT(4) << "Loader: Created model" << std::endl;
     39      return true;
     40    }
     41   
     42    void Model::registerAllVariables(){
     43      registerVar(&meshSrc_, meshSrc_.length()+1, network::STRING);
    3544    }
    3645}
Note: See TracChangeset for help on using the changeset viewer.