Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2017, 4:35:38 PM (7 years ago)
Author:
kohlia
Message:

Crashes when killing the player

File:
1 edited

Legend:

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

    r11638 r11662  
    318318        {
    319319            this->getLevel()->getScriptableController()->setPlayer(player);
    320             // TODO Fix for relative paths
    321             this->getLevel()->getScriptableController()->runScript(this->getLevel()->getFilename() + "/" + this->getLevel()->getScript());
     320
     321            std::string script = this->getLevel()->getScript();
     322            if(script.at(0) != '/')
     323                script = "../levels/" + script; // Not very dynamic
     324            this->getLevel()->getScriptableController()->runScript(script);
    322325        }
    323326    }
Note: See TracChangeset for help on using the changeset viewer.