Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 10, 2008, 1:37:36 AM (17 years ago)
Author:
rgrieder
Message:

merged gui back to trunk.
update the media repository!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/Ambient.cc

    r1747 r1755  
    4343#include "core/XMLPort.h"
    4444#include "core/ConsoleCommand.h"
     45#include "Settings.h"
    4546#include "GraphicsEngine.h"
    4647
     
    6667    bool Ambient::create()
    6768    {
    68         GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(ambientLight_);
     69        if (Settings::showsGraphics())
     70            GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(ambientLight_);
    6971        return Synchronisable::create();
    7072    }
     
    7779    void Ambient::setAmbientLight(const ColourValue& colour)
    7880    {
    79         GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
    80         ambientLight_=colour;
     81        if (Settings::showsGraphics())
     82            GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(colour);
     83        ambientLight_ = colour;
    8184    }
    8285
    8386    /**
    84         @brief XML loading and saving.
    85         @param xmlelement The XML-element
    86         @param loading Loading (true) or saving (false)
    87         @return The XML-element
     87    @brief
     88        XML loading and saving.
     89    @param
     90        xmlelement The XML-element
     91    @param
     92        loading Loading (true) or saving (false)
     93    @return
     94        The XML-element
    8895    */
    8996    void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Note: See TracChangeset for help on using the changeset viewer.