Changeset 1755 for code/trunk/src/orxonox/gamestates
- Timestamp:
- Sep 10, 2008, 1:37:36 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 1 edited
- 19 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/gui (added) merged: 1636,1638,1640-1647,1649-1654,1656,1659-1665,1670,1672-1674,1686,1688-1692,1694-1697,1704 /code/branches/input (added) merged: 1629-1630
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSClient.cc
r1724 r1755 54 54 int serverPort = CommandLine::getArgument<int>("port")->getValue(); 55 55 std::string serverIP = CommandLine::getArgument<std::string>("ip")->getValue(); 56 this->client_ = ne twork::Client::createSingleton(serverIP, serverPort);56 this->client_ = new network::Client(serverIP, serverPort); 57 57 58 58 if(!client_->establishConnection()) … … 73 73 client_->closeConnection(); 74 74 75 // TODO: destroy client 75 // destroy client 76 delete this->client_; 76 77 77 78 GSLevel::leave(); -
code/trunk/src/orxonox/gamestates/GSDedicated.cc
r1724 r1755 70 70 71 71 int serverPort = CommandLine::getArgument<int>("port")->getValue(); 72 this->server_ = ne twork::Server::createSingleton(serverPort);72 this->server_ = new network::Server(serverPort); 73 73 74 74 // call the loader … … 82 82 FunctorMember01<GSDedicated, float>* functor = createFunctor(&GSDedicated::setTimeFactor); 83 83 functor->setObject(this); 84 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")) ;84 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);; 85 85 } 86 86 … … 93 93 94 94 this->server_->close(); 95 // TODO: destroy server95 delete this->server_; 96 96 97 97 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_); … … 103 103 { 104 104 // Call those objects that need the real time 105 for ( Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it)105 for (ObjectList<TickableReal>::iterator it = ObjectList<TickableReal>::begin(); it; ++it) 106 106 it->tick(time.getDeltaTime()); 107 107 // Call the scene objects 108 for ( Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)108 for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it) 109 109 it->tick(time.getDeltaTime() * this->timeFactor_); 110 110 -
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r1724 r1755 40 40 #include <OgreWindowEventUtilities.h> 41 41 42 #include " core/Debug.h"42 #include "util/Debug.h" 43 43 #include "core/ConsoleCommand.h" 44 44 #include "core/ConfigValueIncludes.h" … … 308 308 void GSGraphics::windowMoved(Ogre::RenderWindow *rw) 309 309 { 310 for ( Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)310 for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it) 311 311 it->windowMoved(); 312 312 } … … 323 323 void GSGraphics::windowResized(Ogre::RenderWindow *rw) 324 324 { 325 for ( Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)325 for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it) 326 326 it->windowResized(this->renderWindow_->getWidth(), this->renderWindow_->getHeight()); 327 327 } … … 335 335 void GSGraphics::windowFocusChanged(Ogre::RenderWindow *rw) 336 336 { 337 for ( Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)337 for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it) 338 338 it->windowFocusChanged(); 339 339 } -
code/trunk/src/orxonox/gamestates/GSLevel.cc
r1724 r1755 86 86 // reset game speed to normal 87 87 timeFactor_ = 1.0f; 88 89 // TODO: insert slomo console command with 90 // .accessLevel(AccessLevel::Offline).defaultValue(0, 1.0).axisParamIndex(0).isAxisRelative(false); 88 91 } 89 92 … … 111 114 { 112 115 // Call those objects that need the real time 113 for ( Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it)116 for (ObjectList<TickableReal>::iterator it = ObjectList<TickableReal>::begin(); it; ++it) 114 117 it->tick(time.getDeltaTime()); 115 118 // Call the scene objects 116 for ( Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)119 for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it) 117 120 it->tick(time.getDeltaTime() * this->timeFactor_); 118 121 119 for ( Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; ++it)122 for (ObjectList<TimerBase>::iterator it = ObjectList<TimerBase>::begin(); it; ++it) 120 123 it->tick(time); 121 124 } … … 129 132 float change = factor / this->timeFactor_; 130 133 this->timeFactor_ = factor; 131 for ( Iterator<ParticleInterface>it = ObjectList<ParticleInterface>::begin(); it; ++it)134 for (ObjectList<ParticleInterface>::iterator it = ObjectList<ParticleInterface>::begin(); it; ++it) 132 135 it->setSpeedFactor(it->getSpeedFactor() * change); 133 136 134 for ( Iterator<Backlight>it = ObjectList<Backlight>::begin(); it; ++it)137 for (ObjectList<Backlight>::iterator it = ObjectList<Backlight>::begin(); it; ++it) 135 138 it->setTimeFactor(timeFactor_); 136 139 } -
code/trunk/src/orxonox/gamestates/GSRoot.cc
r1724 r1755 40 40 #include "core/ConsoleCommand.h" 41 41 #include "core/CommandLine.h" 42 #include " core/Debug.h"42 #include "util/Debug.h" 43 43 #include "core/Exception.h" 44 44 #include "core/TclBind.h" … … 95 95 { 96 96 #if ORXONOX_DEBUG_MODE == 1 97 ConfigFileManager::get Singleton()->setFile(CFT_Settings, "orxonox_d.ini");97 ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox_d.ini"); 98 98 #else 99 ConfigFileManager::get Singleton()->setFile(CFT_Settings, "orxonox.ini");99 ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox.ini"); 100 100 #endif 101 101 -
code/trunk/src/orxonox/gamestates/GSServer.cc
r1724 r1755 57 57 58 58 int serverPort = CommandLine::getArgument<int>("port")->getValue(); 59 this->server_ = network::Server::createSingleton(serverPort); 59 this->server_ = new network::Server(serverPort); 60 COUT(0) << "Loading scene in server mode" << std::endl; 60 61 61 62 this->loadLevel(); … … 66 67 FunctorMember<GSLevel>* functor = createFunctor(&GSLevel::setTimeFactor); 67 68 functor->setObject(this); 68 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")) ;69 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);; 69 70 70 71 // level is loaded: we can start capturing the input … … 81 82 82 83 this->server_->close(); 83 // TODO: destroy server84 delete this->server_; 84 85 85 86 GSLevel::leave(); -
code/trunk/src/orxonox/gamestates/GSStandalone.cc
r1724 r1755 53 53 FunctorMember<GSLevel>* functor = createFunctor(&GSLevel::setTimeFactor); 54 54 functor->setObject(this); 55 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")) ;55 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);; 56 56 57 57 // level is loaded: we can start capturing the input
Note: See TracChangeset
for help on using the changeset viewer.