Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11901


Ignore:
Timestamp:
Apr 24, 2018, 1:36:15 PM (7 years ago)
Author:
adamc
Message:

scriptablecontroller fixed respawn reexecution

Location:
code/branches/ScriptableController_FS18/src/orxonox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController_FS18/src/orxonox/infos/GametypeInfo.cc

    r11855 r11901  
    299299            this->setReadyToSpawnHelper(player, false);
    300300            this->setSpawnedHelper(player, false);
     301
    301302        }
    302303    }
     
    317318
    318319        // TODO We might want to handle the subsequent spawns as well somehow
    319         if(player->isHumanPlayer() && player->isLocalPlayer() && this->isFirstSpawn_)
     320        if(player->isHumanPlayer() && player->isLocalPlayer()) //&& this->isFirstSpawn_)
    320321        {
    321322            this->isFirstSpawn_ = false;
     
    360361            {
    361362                // Display "Press [Fire] to start the match" if the game has not yet ended.
    362                 if(!this->hasEnded())
     363                if(!this->hasEnded()){
    363364                    NotificationListener::sendNotification("Press [Fire] to start the match", GametypeInfo::NOTIFICATION_SENDER, NotificationMessageType::info, NotificationSendMode::network, player->getClientID());
     365               
     366                    //this->getLevel()->getScriptableController()->setPlayer(player);
     367
     368                    // This handles paths relative to the 'level' directory
     369                    //std::string script = this->getLevel()->getScript();
     370                    //if(script.at(0) != '/')
     371                    //script = "../levels/" + script; // Not very dynamic
     372                    //this->getLevel()->getScriptableController()->runScript(script);
     373                }
    364374                // Else display "Game has ended".
    365375                else
  • code/branches/ScriptableController_FS18/src/orxonox/scriptablecontroller/scriptable_controller_api.cc

    r11854 r11901  
    152152        {
    153153            orxout(user_warning) << "Script tried to spawn an object that is neither a WorldEntity, nor a PlayerInfo" << std::endl;
     154           
    154155            return;
    155156        }
     
    361362    }
    362363
     364    //void ScriptableControllerAPI::moveEntity(std::string id, double x, double y, double z)
     365
    363366}
Note: See TracChangeset for help on using the changeset viewer.