Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10321 in orxonox.OLD for trunk/src/lib/script_engine


Ignore:
Timestamp:
Jan 24, 2007, 10:28:18 AM (18 years ago)
Author:
patrick
Message:

silvans complete patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/script_engine/script.cc

    r10319 r10321  
    9494 {
    9595   std::string filedest(Resources::ResourceManager::getInstance()->mainGlobalPath().name());
    96    filedest += "/scripts/" + filename;
     96
     97   std::string directory = "";
     98   std::string file = filename;
     99
     100   unsigned int seperation =  filename.find_last_of('/');
     101   if (seperation != std::string::npos)
     102   {
     103    directory = filename.substr( 0, seperation+1 );
     104    file = filename.substr( seperation+1 );
     105   }
     106   filedest += "scripts/" + directory + file;
    97107
    98108   this->addThisScript();
Note: See TracChangeset for help on using the changeset viewer.