Changeset 5850 for code/branches/core5/src/orxonox/gamestates/GSLevel.cc
- Timestamp:
- Oct 1, 2009, 11:44:53 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/gamestates/GSLevel.cc
r5842 r5850 41 41 #include "core/Game.h" 42 42 #include "core/GameMode.h" 43 #include "core/GraphicsManager.h"44 43 #include "core/GUIManager.h" 45 44 #include "core/Loader.h" 46 45 #include "core/XMLFile.h" 47 46 48 #include "tools/interfaces/Tickable.h"49 #include "CameraManager.h"50 47 #include "LevelManager.h" 51 48 #include "PlayerManager.h" 52 #include "infos/HumanPlayer.h"53 49 54 50 namespace orxonox … … 65 61 , guiMouseOnlyInputState_(0) 66 62 , guiKeysOnlyInputState_(0) 67 , cameraManager_(0)68 63 { 69 64 RegisterObject(GSLevel); … … 98 93 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly"); 99 94 guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr()); 100 101 // create the global CameraManager 102 this->cameraManager_ = new CameraManager(GraphicsManager::getInstance().getViewport()); 103 } 104 105 this->playerManager_ = new PlayerManager(); 106 107 this->scope_GSLevel_ = new Scope<ScopeID::GSLevel>(); 95 } 108 96 109 97 if (GameMode::isMaster()) … … 126 114 127 115 // connect the HumanPlayer to the game 128 this->playerManager_->clientConnected(0);116 PlayerManager::getInstance().clientConnected(0); 129 117 } 130 118 } … … 165 153 { 166 154 // disconnect the HumanPlayer 167 this->playerManager_->clientDisconnected(0);155 PlayerManager::getInstance().clientDisconnected(0); 168 156 169 157 // unload all compositors (this is only necessary because we don't yet destroy all resources!) … … 184 172 if (GameMode::isMaster()) 185 173 this->unloadLevel(); 186 187 if (this->cameraManager_)188 {189 delete this->cameraManager_;190 this->cameraManager_ = 0;191 }192 193 if (this->playerManager_)194 {195 this->playerManager_->destroy();196 this->playerManager_ = 0;197 }198 199 if (this->scope_GSLevel_)200 {201 delete this->scope_GSLevel_;202 this->scope_GSLevel_ = NULL;203 }204 174 205 175 if (GameMode::showsGraphics())
Note: See TracChangeset
for help on using the changeset viewer.