Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 3, 2008, 2:12:10 PM (17 years ago)
Author:
scheusso
Message:

more adjustments for synchronisation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/objects/Ambient.cc

    r871 r977  
    5151    {
    5252        RegisterObject(Ambient);
     53        registerAllVariables();
    5354    }
    5455
     
    5758    }
    5859
     60    bool Ambient::create(){
     61      Orxonox::getSingleton()->getSceneManager()->setAmbientLight(ambientLight_);
     62      return true;
     63    }
     64   
     65    void Ambient::registerAllVariables(){
     66      registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);
     67     
     68    }
     69   
    5970    void Ambient::loadParams(TiXmlElement* xmlElem)
    6071    {
     
    7687   void Ambient::setAmbientLight(const ColourValue& colour)
    7788   {
    78         Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour);
     89      ambientLight_=colour;     
    7990   }
    8091
     
    90101
    91102        XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, loading);
     103        create();
    92104    }
    93105}
Note: See TracChangeset for help on using the changeset viewer.