Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 24, 2008, 3:43:59 PM (16 years ago)
Author:
scheusso
Message:

made objects synchronisable

File:
1 edited

Legend:

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

    r1064 r1174  
    5757        RegisterObject(Ambient);
    5858        Ambient::instance_s = this;
     59        registerAllVariables();
    5960    }
    6061
     
    6364    }
    6465
     66    bool Ambient::create(){
     67      GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(ambientLight_);
     68      return true;
     69    }
     70   
     71    void Ambient::registerAllVariables(){
     72      registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);
     73     
     74    }
     75   
    6576    void Ambient::loadParams(TiXmlElement* xmlElem)
    6677    {
     
    8394   {
    8495        GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
     96      ambientLight_=colour;     
    8597   }
    8698
     
    96108
    97109        XMLPortParamLoadOnly(Ambient, "colourvalue", setAmbientLight, xmlelement, mode);
     110        create();
    98111    }
    99112}
Note: See TracChangeset for help on using the changeset viewer.