- Timestamp:
- Apr 12, 2018, 2:07:03 PM (7 years ago)
- Location:
- code/branches/ScriptableController_FS18
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController_FS18
- Property svn:mergeinfo changed
/code/branches/ScriptableController_HS17 (added) merged: 11462,11518-11519,11549,11552,11562,11583,11606,11638,11662,11673-11674,11684,11852,11854
- Property svn:mergeinfo changed
-
code/branches/ScriptableController_FS18/src/orxonox/infos/GametypeInfo.cc
r11099 r11855 43 43 #include "interfaces/GametypeMessageListener.h" 44 44 #include "interfaces/NotificationListener.h" 45 #include "scriptablecontroller/scriptable_controller.h" 46 #include "Level.h" 45 47 46 48 #include "PlayerInfo.h" … … 76 78 this->spawned_ = false; 77 79 this->readyToSpawn_ = false; 80 this->isFirstSpawn_ = true; 78 81 79 82 this->registerVariables(); … … 310 313 { 311 314 if(this->hasStarted() && !this->hasEnded()) 312 313 315 this->setSpawnedHelper(player, true); 316 } 317 318 // TODO We might want to handle the subsequent spawns as well somehow 319 if(player->isHumanPlayer() && player->isLocalPlayer() && this->isFirstSpawn_) 320 { 321 this->isFirstSpawn_ = false; 322 this->getLevel()->getScriptableController()->setPlayer(player); 323 324 // This handles paths relative to the 'level' directory 325 std::string script = this->getLevel()->getScript(); 326 if(script.at(0) != '/') 327 script = "../levels/" + script; // Not very dynamic 328 this->getLevel()->getScriptableController()->runScript(script); 314 329 } 315 330 } -
code/branches/ScriptableController_FS18/src/orxonox/infos/GametypeInfo.h
r11720 r11855 83 83 inline bool isStartCountdownRunning() const 84 84 { return this->bStartCountdownRunning_; } 85 85 86 void changedStartCountdownRunning(void); // Is called when the start countdown has been either started or stopped. 86 87 … … 166 167 bool spawned_; //!< Whether the local Player is currently spawned. 167 168 bool readyToSpawn_; //!< Whether the local Player is ready to spawn. 169 bool isFirstSpawn_; 168 170 }; 169 171 } -
code/branches/ScriptableController_FS18/src/orxonox/infos/HumanPlayer.cc
r11071 r11855 38 38 #include "gametypes/Gametype.h" 39 39 #include "overlays/OverlayGroup.h" 40 #include "Level.h" 41 #include "scriptablecontroller/scriptable_controller.h" 40 42 41 43 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.