Changeset 1892 for code/branches
- Timestamp:
- Oct 6, 2008, 10:25:09 PM (16 years ago)
- Location:
- code/branches/network/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/Settings.cc
r1755 r1892 51 51 : bShowsGraphics_(false) 52 52 , bHasServer_(false) 53 , bIsClient_(false) 53 54 { 54 55 RegisterRootObject(Settings); -
code/branches/network/src/orxonox/Settings.h
r1755 r1892 54 54 friend class GSServer; 55 55 friend class GSDedicated; 56 friend class GSClient; 56 57 57 58 public: … … 64 65 static bool showsGraphics() { assert(singletonRef_s); return singletonRef_s->bShowsGraphics_; } 65 66 static bool hasServer() { assert(singletonRef_s); return singletonRef_s->bHasServer_; } 67 static bool isClient() { assert(singletonRef_s); return singletonRef_s->bIsClient_; } 66 68 67 69 private: … … 69 71 static void setShowsGraphics(bool val) { assert(singletonRef_s); singletonRef_s->bShowsGraphics_ = val; } 70 72 static void setHasServer (bool val) { assert(singletonRef_s); singletonRef_s->bHasServer_ = val; } 73 static void setIsClient (bool val) { assert(singletonRef_s); singletonRef_s->bIsClient_ = val; } 71 74 72 75 Settings(); … … 82 85 bool bShowsGraphics_; //!< global variable that tells whether to show graphics 83 86 bool bHasServer_; //!< global variable that tells whether this is a server 87 bool bIsClient_; 84 88 85 89 std::string dataPath_; //!< Path to the game data -
code/branches/network/src/orxonox/gamestates/GSClient.cc
r1755 r1892 33 33 #include "core/CommandLine.h" 34 34 #include "network/Client.h" 35 #include "Settings.h" 35 36 36 37 namespace orxonox … … 50 51 void GSClient::enter() 51 52 { 53 Settings::_getInstance().bIsClient_ = true; 54 52 55 GSLevel::enter(); 53 56 … … 77 80 78 81 GSLevel::leave(); 82 83 Settings::_getInstance().bIsClient_ = false; 79 84 } 80 85
Note: See TracChangeset
for help on using the changeset viewer.