Changeset 7284 for code/trunk/src/orxonox
- Timestamp:
- Aug 31, 2010, 3:37:40 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/CameraManager.cc
r6417 r7284 34 34 35 35 #include "util/StringUtils.h" 36 #include "util/ScopedSingletonManager.h" 36 37 #include "core/GameMode.h" 37 38 #include "core/GraphicsManager.h" 38 39 #include "core/GUIManager.h" 39 40 #include "core/ObjectList.h" 40 #include "core/ScopedSingletonManager.h"41 41 #include "tools/Shader.h" 42 42 #include "graphics/Camera.h" -
code/trunk/src/orxonox/ChatHistory.cc
r7163 r7284 28 28 29 29 #include "ChatHistory.h" 30 #include <core/ScopedSingletonManager.h>30 #include "util/ScopedSingletonManager.h" 31 31 32 32 #ifndef CHATTEST -
code/trunk/src/orxonox/ChatInputHandler.cc
r7183 r7284 28 28 29 29 #include "ChatInputHandler.h" 30 #include <core/ScopedSingletonManager.h> 31 #include "core/ConsoleCommand.h" 30 #include "util/ScopedSingletonManager.h" 32 31 #include "core/CoreIncludes.h" 33 32 #include "core/GUIManager.h" 34 33 #include "core/CorePrereqs.h" 34 #include "core/command/ConsoleCommand.h" 35 35 #include <CEGUIWindow.h> 36 36 #include <elements/CEGUIListbox.h> … … 46 46 47 47 /* add commands to console */ 48 SetConsoleCommandAlias( ChatInputHandler, activate_static, "startchat", 49 true ); 50 SetConsoleCommandAlias( ChatInputHandler, activate_small_static, 51 "startchat_small", true ); 48 SetConsoleCommand( "startchat", &ChatInputHandler::activate_static ); 49 SetConsoleCommand( "startchat_small", &ChatInputHandler::activate_small_static ); 52 50 53 51 /* constructor */ -
code/trunk/src/orxonox/LevelManager.cc
r7163 r7284 31 31 #include <map> 32 32 33 #include "util/ScopedSingletonManager.h" 33 34 #include "core/CommandLineParser.h" 34 35 #include "core/ConfigValueIncludes.h" … … 36 37 #include "core/Loader.h" 37 38 #include "core/Resource.h" 38 #include "core/ScopedSingletonManager.h"39 39 #include "PlayerManager.h" 40 40 #include "Level.h" -
code/trunk/src/orxonox/MoodManager.cc
r7163 r7284 29 29 #include "MoodManager.h" 30 30 31 #include "util/ScopedSingletonManager.h" 31 32 #include "core/ConfigValueIncludes.h" 32 33 #include "core/CoreIncludes.h" 33 #include "core/ScopedSingletonManager.h"34 34 #include "core/Resource.h" 35 35 … … 48 48 // Need to use a variable to store old data because ResetConfigValues() doesn't seem to work. 49 49 oldMood_ = MoodManager::defaultMood_; 50 50 51 51 // Checking for the existence of the folder for the default mood 52 52 const std::string& path = "ambient/" + MoodManager::defaultMood_ + "/."; -
code/trunk/src/orxonox/OrxonoxPrecompiledHeaders.h
r5781 r7284 89 89 #include "network/synchronisable/Synchronisable.h" // 70 90 90 #include "util/MultiType.h" // 65 91 #include "core/ Executor.h" // 5591 #include "core/command/Executor.h" // 55 92 92 //#include "core/XMLPort.h" // 41 93 93 -
code/trunk/src/orxonox/PlayerManager.cc
r6746 r7284 29 29 #include "PlayerManager.h" 30 30 31 #include "util/ScopedSingletonManager.h" 31 32 #include "core/CoreIncludes.h" 32 33 #include "core/GameMode.h" 33 #include "core/ScopedSingletonManager.h"34 34 #include "Level.h" 35 35 #include "infos/HumanPlayer.h" -
code/trunk/src/orxonox/Radar.cc
r7163 r7284 37 37 38 38 //#include "util/Math.h" 39 #include "core/ConsoleCommand.h"40 39 #include "core/ObjectList.h" 40 #include "core/command/ConsoleCommand.h" 41 41 #include "interfaces/RadarListener.h" 42 42 #include "controllers/HumanController.h" -
code/trunk/src/orxonox/Test.cc
r7163 r7284 29 29 #include "core/CoreIncludes.h" 30 30 #include "core/ConfigValueIncludes.h" 31 #include "core/ ConsoleCommand.h"31 #include "core/command/ConsoleCommand.h" 32 32 #include "network/NetworkFunction.h" 33 33 #include "Test.h" … … 37 37 { 38 38 CreateFactory ( Test ); 39 40 SetConsoleCommand( Test, printV1, true).accessLevel(AccessLevel::User);41 SetConsoleCommand( Test, printV2, true).accessLevel(AccessLevel::User);42 SetConsoleCommand( Test, printV3, true).accessLevel(AccessLevel::User);43 SetConsoleCommand( Test, printV4, true).accessLevel(AccessLevel::User);44 SetConsoleCommand( Test, call, true).accessLevel(AccessLevel::User);45 SetConsoleCommand( Test, call2, true).accessLevel(AccessLevel::User);46 47 39 40 SetConsoleCommand("Test", "printV1", &Test::printV1).addShortcut(); 41 SetConsoleCommand("Test", "printV2", &Test::printV2).addShortcut(); 42 SetConsoleCommand("Test", "printV3", &Test::printV3).addShortcut(); 43 SetConsoleCommand("Test", "printV4", &Test::printV4).addShortcut(); 44 SetConsoleCommand("Test", "call", &Test::call).addShortcut(); 45 SetConsoleCommand("Test", "call2", &Test::call2).addShortcut(); 46 47 48 48 //void=* aaaaa = copyPtr<sizeof(&Test::printV1)>( &NETWORK_FUNCTION_POINTER, &Test::printV1 ); 49 49 //void* NETWORK_FUNCTION_TEST_B = memcpy(&NETWORK_FUNCTION_POINTER, &a, sizeof(a)); 50 50 // NetworkFunctionBase* NETWORK_FUNCTION_TEST_C = new NetworkFunctionStatic( createFunctor(&Test::printV1), "bla", NETWORK_FUNCTION_POINTER ); 51 51 52 52 registerStaticNetworkFunction( &Test::printV1 ); 53 53 registerMemberNetworkFunction( Test, checkU1 ); 54 54 registerMemberNetworkFunction( Test, printBlaBla ); 55 55 56 56 Test* Test::instance_ = 0; 57 57 … … 78 78 SetConfigValue ( u3, 3 )/*.callback ( this, &Test::checkV3 )*/; 79 79 SetConfigValue ( u4, 4 )/*.callback ( this, &Test::checkV4 )*/; 80 80 81 81 SetConfigValue ( s1, 1 )/*.callback ( this, &Test::checkV1 )*/; 82 82 SetConfigValue ( s2, 2 )/*.callback ( this, &Test::checkV2 )*/; … … 89 89 { 90 90 registerVariable ( this->mySet_, VariableDirection::ToClient ); 91 91 92 92 // registerVariable ( u1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkU1 )); 93 93 // registerVariable ( u2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkU2 )); 94 94 // registerVariable ( u3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkU3 ), true ); 95 95 // registerVariable ( u4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkU4 ), true ); 96 96 97 97 // registerVariable ( s1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkS1 )); 98 98 // registerVariable ( s2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkS2 )); 99 99 // registerVariable ( s3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkS3 ), true ); 100 100 // registerVariable ( s4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true ); 101 101 102 102 // registerVariable ( pointer_, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::printPointer ) ); 103 103 } 104 104 105 105 void Test::call(unsigned int clientID) 106 106 { … … 108 108 callStaticNetworkFunction( &Test::printV1, clientID ); 109 109 } 110 110 111 111 void Test::call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4) 112 112 { 113 113 callMemberNetworkFunction( Test, printBlaBla, this->getObjectID(), clientID, s1, s2, s3, s4, s4 ); 114 114 } 115 115 116 116 void Test::tick(float dt) 117 117 { … … 132 132 // callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 ); 133 133 } 134 134 135 135 void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5) 136 136 { 137 137 COUT(0) << s1 << s2 << s3 << s4 << s5 << endl; 138 138 } 139 139 140 140 void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; } 141 141 void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; } … … 147 147 void Test::checkS3(){ COUT(1) << "S3 changed: " << s3 << std::endl; } 148 148 void Test::checkS4(){ COUT(1) << "S4 changed: " << s4 << std::endl; } 149 149 150 150 void Test::printPointer(){ CCOUT(1) << "pointer: " << this->pointer_ << endl; } 151 151 -
code/trunk/src/orxonox/controllers/AIController.cc
r7184 r7284 31 31 #include "util/Math.h" 32 32 #include "core/CoreIncludes.h" 33 #include "core/ Executor.h"33 #include "core/command/Executor.h" 34 34 #include "worldentities/ControllableEntity.h" 35 35 #include "worldentities/pawns/Pawn.h" -
code/trunk/src/orxonox/controllers/ArtificialController.cc
r7184 r7284 33 33 34 34 #include "util/Math.h" 35 #include "core/ConsoleCommand.h"36 35 #include "core/CoreIncludes.h" 37 36 #include "core/XMLPort.h" 37 #include "core/command/ConsoleCommand.h" 38 38 #include "worldentities/ControllableEntity.h" 39 39 #include "worldentities/pawns/Pawn.h" … … 47 47 namespace orxonox 48 48 { 49 SetConsoleCommand( ArtificialController, formationflight, true);50 SetConsoleCommand( ArtificialController, masteraction, true);51 SetConsoleCommand( ArtificialController, followme, true);52 SetConsoleCommand( ArtificialController, passivebehaviour, true);53 SetConsoleCommand( ArtificialController, formationsize, true);49 SetConsoleCommand("ArtificialController", "formationflight", &ArtificialController::formationflight); 50 SetConsoleCommand("ArtificialController", "masteraction", &ArtificialController::masteraction); 51 SetConsoleCommand("ArtificialController", "followme", &ArtificialController::followme); 52 SetConsoleCommand("ArtificialController", "passivebehaviour", &ArtificialController::passivebehaviour); 53 SetConsoleCommand("ArtificialController", "formationsize", &ArtificialController::formationsize); 54 54 55 55 static const unsigned int STANDARD_MAX_FORMATION_SIZE = 7; -
code/trunk/src/orxonox/controllers/DroneController.cc
r7163 r7284 32 32 33 33 #include "core/CoreIncludes.h" 34 #include "core/ Executor.h"34 #include "core/command/Executor.h" 35 35 #include "worldentities/ControllableEntity.h" 36 36 -
code/trunk/src/orxonox/controllers/HumanController.cc
r7163 r7284 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/ ConsoleCommand.h"32 #include "core/command/ConsoleCommand.h" 33 33 #include "worldentities/ControllableEntity.h" 34 34 #include "worldentities/pawns/Pawn.h" … … 40 40 namespace orxonox 41 41 { 42 SetConsoleCommand( HumanController, moveFrontBack, true).setAsInputCommand();43 SetConsoleCommand( HumanController, moveRightLeft, true).setAsInputCommand();44 SetConsoleCommand( HumanController, moveUpDown, true).setAsInputCommand();45 SetConsoleCommand( HumanController, rotateYaw, true).setAsInputCommand();46 SetConsoleCommand( HumanController, rotatePitch, true).setAsInputCommand();47 SetConsoleCommand( HumanController, rotateRoll, true).setAsInputCommand();48 SetConsoleCommand( HumanController, fire, true).keybindMode(KeybindMode::OnHold);49 SetConsoleCommand( HumanController, reload, true);50 SetConsoleCommand( HumanController, boost, true).keybindMode(KeybindMode::OnHold);51 SetConsoleCommand( HumanController, greet, true);52 SetConsoleCommand( HumanController, switchCamera, true);53 SetConsoleCommand( HumanController, mouseLook, true);54 SetConsoleCommand( HumanController, suicide, true);55 SetConsoleCommand( HumanController, toggleGodMode, true);56 SetConsoleCommand( HumanController, addBots, true).defaultValues(1);57 SetConsoleCommand( HumanController, killBots, true).defaultValues(0);58 SetConsoleCommand( HumanController, dropItems, true);59 SetConsoleCommand( HumanController, useItem, true);60 SetConsoleCommand( HumanController, cycleNavigationFocus, true);61 SetConsoleCommand( HumanController, releaseNavigationFocus, true);42 SetConsoleCommand("HumanController", "moveFrontBack", &HumanController::moveFrontBack ).addShortcut().setAsInputCommand(); 43 SetConsoleCommand("HumanController", "moveRightLeft", &HumanController::moveRightLeft ).addShortcut().setAsInputCommand(); 44 SetConsoleCommand("HumanController", "moveUpDown", &HumanController::moveUpDown ).addShortcut().setAsInputCommand(); 45 SetConsoleCommand("HumanController", "rotateYaw", &HumanController::rotateYaw ).addShortcut().setAsInputCommand(); 46 SetConsoleCommand("HumanController", "rotatePitch", &HumanController::rotatePitch ).addShortcut().setAsInputCommand(); 47 SetConsoleCommand("HumanController", "rotateRoll", &HumanController::rotateRoll ).addShortcut().setAsInputCommand(); 48 SetConsoleCommand("HumanController", "fire", &HumanController::fire ).addShortcut().keybindMode(KeybindMode::OnHold); 49 SetConsoleCommand("HumanController", "reload", &HumanController::reload ).addShortcut(); 50 SetConsoleCommand("HumanController", "boost", &HumanController::boost ).addShortcut().keybindMode(KeybindMode::OnHold); 51 SetConsoleCommand("HumanController", "greet", &HumanController::greet ).addShortcut(); 52 SetConsoleCommand("HumanController", "switchCamera", &HumanController::switchCamera ).addShortcut(); 53 SetConsoleCommand("HumanController", "mouseLook", &HumanController::mouseLook ).addShortcut(); 54 SetConsoleCommand("HumanController", "suicide", &HumanController::suicide ).addShortcut(); 55 SetConsoleCommand("HumanController", "toggleGodMode", &HumanController::toggleGodMode ).addShortcut(); 56 SetConsoleCommand("HumanController", "addBots", &HumanController::addBots ).addShortcut().defaultValues(1); 57 SetConsoleCommand("HumanController", "killBots", &HumanController::killBots ).addShortcut().defaultValues(0); 58 SetConsoleCommand("HumanController", "dropItems", &HumanController::dropItems ).addShortcut(); 59 SetConsoleCommand("HumanController", "useItem", &HumanController::useItem ).addShortcut(); 60 SetConsoleCommand("HumanController", "cycleNavigationFocus", &HumanController::cycleNavigationFocus).addShortcut(); 61 SetConsoleCommand("HumanController", "releaseNavigationFocus", &HumanController::releaseNavigationFocus).addShortcut(); 62 62 63 63 CreateUnloadableFactory(HumanController); -
code/trunk/src/orxonox/controllers/NewHumanController.cc
r7184 r7284 37 37 38 38 #include "core/CoreIncludes.h" 39 #include "core/ ConsoleCommand.h"39 #include "core/command/ConsoleCommand.h" 40 40 #include "worldentities/ControllableEntity.h" 41 41 #include "worldentities/pawns/Pawn.h" … … 49 49 namespace orxonox 50 50 { 51 SetConsoleCommand( NewHumanController, changeMode, false).keybindMode(KeybindMode::OnPress);52 SetConsoleCommand( NewHumanController, accelerate, false).keybindMode(KeybindMode::OnPress);53 SetConsoleCommand( NewHumanController, decelerate, false).keybindMode(KeybindMode::OnPress);54 SetConsoleCommand( NewHumanController, unfire, true).keybindMode(KeybindMode::OnRelease);51 SetConsoleCommand("NewHumanController", "changeMode", &NewHumanController::changeMode).keybindMode(KeybindMode::OnPress); 52 SetConsoleCommand("NewHumanController", "accelerate", &NewHumanController::accelerate).keybindMode(KeybindMode::OnPress); 53 SetConsoleCommand("NewHumanController", "decelerate", &NewHumanController::decelerate).keybindMode(KeybindMode::OnPress); 54 SetConsoleCommand("NewHumanController", "unfire", &NewHumanController::unfire ).keybindMode(KeybindMode::OnRelease).addShortcut(); 55 55 56 56 CreateUnloadableFactory(NewHumanController); -
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r7163 r7284 35 35 #include "GSGraphics.h" 36 36 37 #include "core/CommandExecutor.h"38 #include "core/ConsoleCommand.h"39 37 #include "core/Game.h" 40 38 #include "core/GUIManager.h" 39 #include "core/command/ConsoleCommand.h" 40 #include "core/command/CommandExecutor.h" 41 41 42 42 namespace orxonox -
code/trunk/src/orxonox/gamestates/GSLevel.cc
r6746 r7284 36 36 #include "core/input/InputState.h" 37 37 #include "core/input/KeyBinderManager.h" 38 #include "core/ConsoleCommand.h"39 38 #include "core/Game.h" 40 39 #include "core/GameMode.h" … … 42 41 #include "core/Loader.h" 43 42 #include "core/XMLFile.h" 43 #include "core/command/ConsoleCommand.h" 44 44 45 45 #include "LevelManager.h" -
code/trunk/src/orxonox/gamestates/GSMainMenu.cc
r6746 r7284 33 33 #include "core/input/KeyBinderManager.h" 34 34 #include "core/Game.h" 35 #include "core/ConsoleCommand.h"36 35 #include "core/ConfigValueIncludes.h" 37 36 #include "core/CoreIncludes.h" 38 37 #include "core/GraphicsManager.h" 39 38 #include "core/GUIManager.h" 39 #include "core/command/ConsoleCommand.h" 40 40 #include "Scene.h" 41 41 #include "sound/AmbientSound.h" … … 48 48 DeclareGameState(GSMainMenu, "mainMenu", false, true); 49 49 50 static const std::string __CC_startStandalone_name = "startGame"; 51 static const std::string __CC_startServer_name = "startServer"; 52 static const std::string __CC_startClient_name = "startClient"; 53 static const std::string __CC_startDedicated_name = "startDedicated"; 54 static const std::string __CC_startMainMenu_name = "startMainMenu"; 55 static const std::string __CC_setMainMenuSoundPath_name = "setMMSoundPath"; 56 57 SetConsoleCommand(__CC_startStandalone_name, &GSMainMenu::startStandalone).deactivate(); 58 SetConsoleCommand(__CC_startServer_name, &GSMainMenu::startServer ).deactivate(); 59 SetConsoleCommand(__CC_startClient_name, &GSMainMenu::startClient ).deactivate(); 60 SetConsoleCommand(__CC_startDedicated_name, &GSMainMenu::startDedicated ).deactivate(); 61 SetConsoleCommand(__CC_startMainMenu_name, &GSMainMenu::startMainMenu ).deactivate(); 62 SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath).hide(); 63 50 64 GSMainMenu::GSMainMenu(const GameStateInfo& info) 51 65 : GameState(info) … … 89 103 InputManager::getInstance().enterState("MainMenuHackery"); 90 104 91 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame")); 92 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startServer), "startServer")); 93 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startClient), "startClient")); 94 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startDedicated), "startDedicated")); 95 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu), "startMainMenu")); 96 97 // create command to change sound path 98 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::setMainMenuSoundPath, this), "setMMSoundPath")); 105 ModifyConsoleCommand(__CC_startStandalone_name).activate(); 106 ModifyConsoleCommand(__CC_startServer_name ).activate(); 107 ModifyConsoleCommand(__CC_startClient_name ).activate(); 108 ModifyConsoleCommand(__CC_startDedicated_name ).activate(); 109 ModifyConsoleCommand(__CC_startMainMenu_name ).activate(); 110 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(this); 99 111 100 112 KeyBinderManager::getInstance().setToDefault(); … … 122 134 GUIManager::hideGUI("MainMenu"); 123 135 GraphicsManager::getInstance().setCamera(0); 136 137 ModifyConsoleCommand(__CC_startStandalone_name).deactivate(); 138 ModifyConsoleCommand(__CC_startServer_name ).deactivate(); 139 ModifyConsoleCommand(__CC_startClient_name ).deactivate(); 140 ModifyConsoleCommand(__CC_startDedicated_name ).deactivate(); 141 ModifyConsoleCommand(__CC_startMainMenu_name ).deactivate(); 142 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(0); 124 143 } 125 144 -
code/trunk/src/orxonox/gamestates/GSRoot.cc
r7172 r7284 31 31 #include "util/Clock.h" 32 32 #include "core/BaseObject.h" 33 #include "core/ConsoleCommand.h"34 33 #include "core/Game.h" 35 34 #include "core/GameMode.h" 35 #include "core/command/ConsoleCommand.h" 36 36 #include "network/NetworkFunction.h" 37 37 #include "tools/Timer.h" … … 41 41 { 42 42 DeclareGameState(GSRoot, "root", false, false); 43 SetConsoleCommandShortcut(GSRoot, printObjects); 43 44 static const std::string __CC_setTimeFactor_name = "setTimeFactor"; 45 static const std::string __CC_pause_name = "pause"; 46 47 SetConsoleCommand("printObjects", &GSRoot::printObjects).hide(); 48 SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0); 49 SetConsoleCommand(__CC_pause_name, &GSRoot::pause ).accessLevel(AccessLevel::Master); 44 50 45 51 registerStaticNetworkFunction(&TimeFactorListener::setTimeFactor); … … 76 82 TimeFactorListener::setTimeFactor(1.0f); 77 83 78 // time factor console command 79 ConsoleCommand* command = createConsoleCommand(createFunctor(&GSRoot::setTimeFactor, this), "setTimeFactor"); 80 CommandExecutor::addConsoleCommandShortcut(command).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0); 81 82 // time factor console command 83 command = createConsoleCommand(createFunctor(&GSRoot::pause, this), "pause"); 84 CommandExecutor::addConsoleCommandShortcut(command).accessLevel(AccessLevel::Offline); 84 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this); 85 ModifyConsoleCommand(__CC_pause_name).setObject(this); 85 86 } 86 87 87 88 void GSRoot::deactivate() 88 89 { 90 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0); 91 ModifyConsoleCommand(__CC_pause_name).setObject(0); 89 92 } 90 93 -
code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
r7163 r7284 155 155 spaceship->getEngine()->setSpeedFactor(5); 156 156 WeakPtr<Engine>* ptr = new WeakPtr<Engine>(spaceship->getEngine()); 157 new Timer(10, false, &createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this))->setDefaultValue(0, ptr), true); 157 ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this)); 158 executor->setDefaultValue(0, ptr); 159 new Timer(10, false, executor, true); 158 160 } 159 161 } … … 254 256 spaceship->getEngine()->setSpeedFactor(5); 255 257 WeakPtr<Engine>* ptr = new WeakPtr<Engine>(spaceship->getEngine()); 256 new Timer(10, false, &createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this))->setDefaultValue(0, ptr), true); 258 ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this)); 259 executor->setDefaultValue(0, ptr); 260 new Timer(10, false, executor, true); 257 261 } 258 262 -
code/trunk/src/orxonox/gametypes/Gametype.cc
r7163 r7284 33 33 #include "core/ConfigValueIncludes.h" 34 34 #include "core/GameMode.h" 35 #include "core/ ConsoleCommand.h"35 #include "core/command/ConsoleCommand.h" 36 36 37 37 #include "infos/PlayerInfo.h" … … 79 79 else 80 80 this->scoreboard_ = 0; 81 82 /* HACK HACK HACK */83 this->hackAddBots_ = createConsoleCommand( createFunctor(&Gametype::addBots, this), "hackAddBots");84 this->hackKillBots_ = createConsoleCommand( createFunctor(&Gametype::killBots, this), "hackKillBots");85 CommandExecutor::addConsoleCommandShortcut( this->hackAddBots_ );86 CommandExecutor::addConsoleCommandShortcut( this->hackKillBots_ );87 /* HACK HACK HACK */88 81 } 89 82 … … 93 86 { 94 87 this->gtinfo_->destroy(); 95 if( this->hackAddBots_ )96 delete this->hackAddBots_;97 if( this->hackKillBots_ )98 delete this->hackKillBots_;99 88 } 100 89 } -
code/trunk/src/orxonox/gametypes/Gametype.h
r6417 r7284 184 184 // Config Values 185 185 std::string scoreboardTemplate_; 186 187 /* HACK HACK HACK */188 ConsoleCommand* hackAddBots_;189 ConsoleCommand* hackKillBots_;190 /* HACK HACK HACK */191 186 }; 192 187 } -
code/trunk/src/orxonox/gametypes/TeamBaseMatch.cc
r5929 r7284 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/ Executor.h"32 #include "core/command/Executor.h" 33 33 #include "worldentities/pawns/TeamBaseMatchBase.h" 34 34 #include "infos/PlayerInfo.h" -
code/trunk/src/orxonox/graphics/ParticleSpawner.cc
r5929 r7284 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/EventIncludes.h" 33 #include "core/Executor.h"34 33 #include "core/XMLPort.h" 34 #include "core/command/Executor.h" 35 35 #include "tools/ParticleInterface.h" 36 36 -
code/trunk/src/orxonox/overlays/InGameConsole.cc
r6502 r7284 45 45 #include "util/Math.h" 46 46 #include "util/DisplayStringConversions.h" 47 #include "util/ScopedSingletonManager.h" 47 48 #include "core/CoreIncludes.h" 48 49 #include "core/ConfigValueIncludes.h" 49 #include "core/ConsoleCommand.h" 50 #include "core/ScopedSingletonManager.h" 50 #include "core/command/ConsoleCommand.h" 51 51 #include "core/input/InputManager.h" 52 52 #include "core/input/InputState.h" … … 58 58 const float CHAR_WIDTH = 7.45f; // fix this please - determine the char-width dynamically 59 59 60 SetConsoleCommand( InGameConsole, openConsole, true);61 SetConsoleCommand( InGameConsole, closeConsole, true);60 SetConsoleCommand("InGameConsole", "openConsole", &InGameConsole::openConsole).addShortcut(); 61 SetConsoleCommand("InGameConsole", "closeConsole", &InGameConsole::closeConsole).addShortcut(); 62 62 63 63 ManageScopedSingleton(InGameConsole, ScopeID::Graphics, false); -
code/trunk/src/orxonox/overlays/InGameConsole.h
r6417 r7284 37 37 #include "util/OgreForwardRefs.h" 38 38 #include "util/Singleton.h" 39 #include "core/Shell.h"40 39 #include "core/WindowEventListener.h" 40 #include "core/command/Shell.h" 41 41 42 42 namespace orxonox -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r7184 r7284 48 48 #include "core/CoreIncludes.h" 49 49 #include "core/XMLPort.h" 50 #include "core/ ConsoleCommand.h"50 #include "core/command/ConsoleCommand.h" 51 51 52 52 #include "OverlayGroup.h" … … 57 57 std::map<std::string, OrxonoxOverlay*> OrxonoxOverlay::overlays_s; 58 58 59 SetConsoleCommand( OrxonoxOverlay, scaleOverlay, false).accessLevel(AccessLevel::User);60 SetConsoleCommand( OrxonoxOverlay, scrollOverlay, false).accessLevel(AccessLevel::User);61 SetConsoleCommand( OrxonoxOverlay, toggleVisibility, false).accessLevel(AccessLevel::User);62 SetConsoleCommand( OrxonoxOverlay, rotateOverlay, false).accessLevel(AccessLevel::User);59 SetConsoleCommand("OrxonoxOverlay", "scaleOverlay", &OrxonoxOverlay::scaleOverlay); 60 SetConsoleCommand("OrxonoxOverlay", "scrollOverlay", &OrxonoxOverlay::scrollOverlay); 61 SetConsoleCommand("OrxonoxOverlay", "toggleVisibility", &OrxonoxOverlay::toggleVisibility); 62 SetConsoleCommand("OrxonoxOverlay", "rotateOverlay", &OrxonoxOverlay::rotateOverlay); 63 63 64 64 OrxonoxOverlay::OrxonoxOverlay(BaseObject* creator) -
code/trunk/src/orxonox/overlays/OverlayGroup.cc
r6417 r7284 34 34 #include "OverlayGroup.h" 35 35 36 #include "core/ConsoleCommand.h"37 36 #include "core/CoreIncludes.h" 38 37 #include "core/XMLPort.h" 38 #include "core/command/ConsoleCommand.h" 39 39 #include "OrxonoxOverlay.h" 40 40 … … 43 43 CreateFactory(OverlayGroup); 44 44 45 SetConsoleCommand( OverlayGroup, toggleVisibility, false).accessLevel(AccessLevel::User);46 SetConsoleCommand( OverlayGroup, scaleGroup, false).accessLevel(AccessLevel::User);47 SetConsoleCommand( OverlayGroup, scrollGroup, false).accessLevel(AccessLevel::User);45 SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility); 46 SetConsoleCommand("OverlayGroup", "scaleGroup", &OverlayGroup::scaleGroup); 47 SetConsoleCommand("OverlayGroup", "scrollGroup", &OverlayGroup::scrollGroup); 48 48 49 49 OverlayGroup::OverlayGroup(BaseObject* creator) -
code/trunk/src/orxonox/sound/SoundManager.cc
r7266 r7284 38 38 #include "util/Math.h" 39 39 #include "util/Clock.h" 40 #include "util/ScopedSingletonManager.h" 40 41 #include "core/ConfigValueIncludes.h" 41 42 #include "core/CoreIncludes.h" 42 43 #include "core/GameMode.h" 43 #include "core/ScopedSingletonManager.h"44 44 #include "core/Resource.h" 45 45 #include "SoundBuffer.h" -
code/trunk/src/orxonox/sound/WorldSound.cc
r7163 r7284 37 37 #include "Scene.h" 38 38 #include "SoundManager.h" 39 #include <core/ConsoleCommandCompilation.h>40 39 41 40 namespace orxonox -
code/trunk/src/orxonox/weaponsystem/Munition.cc
r5929 r7284 461 461 if (bUseReloadTime && (munition->reloadTime_ > 0 || munition->bStackMunition_)) 462 462 { 463 Executor*executor = createExecutor(createFunctor(&Magazine::loaded, this));463 const ExecutorPtr& executor = createExecutor(createFunctor(&Magazine::loaded, this)); 464 464 executor->setDefaultValues(munition); 465 465 -
code/trunk/src/orxonox/worldentities/BigExplosion.cc
r7176 r7284 31 31 #include "util/Exception.h" 32 32 #include "core/CoreIncludes.h" 33 #include "core/Executor.h"34 33 #include "core/GameMode.h" 34 #include "core/command/Executor.h" 35 35 #include "tools/ParticleInterface.h" 36 36 #include "Scene.h" -
code/trunk/src/orxonox/worldentities/ExplosionChunk.cc
r7174 r7284 30 30 31 31 #include "core/CoreIncludes.h" 32 #include "core/Executor.h"33 32 #include "core/GameMode.h" 33 #include "core/command/Executor.h" 34 34 #include "util/Exception.h" 35 35 #include "Scene.h" -
code/trunk/src/orxonox/worldentities/MovableEntity.cc
r6417 r7284 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/Executor.h"34 33 #include "core/GameMode.h" 35 34 #include "core/XMLPort.h" 35 #include "core/command/Executor.h" 36 36 #include "worldentities/pawns/Pawn.h" 37 37
Note: See TracChangeset
for help on using the changeset viewer.