Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 1, 2008, 10:20:24 PM (17 years ago)
Author:
rgrieder
Message:

Added Dedicated game state (name: "dedicated", class: GSDedicated).
It doesn't work at all yet, mainly because of our very poorly designed /objects folder. I tried adding a few "if (Settings::showsGraphics())", but I ran into some serious issues.
I will simply leave this topic up to an eager orxonox developer who wants a dedicated server :D There is A LOT of work to be done…

File:
1 edited

Legend:

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

    r1653 r1694  
    4444#include "core/XMLPort.h"
    4545#include "core/ConsoleCommand.h"
     46#include "Settings.h"
    4647
    4748namespace orxonox
     
    6566
    6667    bool Ambient::create(){
    67       GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(ambientLight_);
    68       return Synchronisable::create();
     68        if (Settings::showsGraphics())
     69            GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(ambientLight_);
     70        return Synchronisable::create();
    6971    }
    70    
     72
    7173    void Ambient::registerAllVariables(){
    72       registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);
    73      
     74        registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);
     75
    7476    }
    7577
    7678    void Ambient::setAmbientLight(const ColourValue& colour)
    7779    {
    78         GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(colour);
    79       ambientLight_=colour;     
     80        if (Settings::showsGraphics())
     81            GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(colour);
     82        ambientLight_=colour;   
    8083    }
    8184
    8285    /**
    83         @brief XML loading and saving.
    84         @param xmlelement The XML-element
    85         @param loading Loading (true) or saving (false)
    86         @return The XML-element
     86    @brief
     87        XML loading and saving.
     88    @param
     89        xmlelement The XML-element
     90    @param
     91        loading Loading (true) or saving (false)
     92    @return
     93        The XML-element
    8794    */
    8895    void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Note: See TracChangeset for help on using the changeset viewer.