Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10251


Ignore:
Timestamp:
Feb 1, 2015, 11:46:42 PM (5 years ago)
Author:
landauf
Message:

use relative path

Location:
code/branches/storymodeHS14
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/storymodeHS14/data/gui/scripts/CampaignMenu.lua

    r10250 r10251  
    5252   
    5353function P.CheckLevel(filename)
    54     local file = io.open("/home/pmao/pmao-extra-0/orxonox/storymode/campaign.txt", "r+")
     54    local file = io.open("campaign.txt", "r+")
    5555    local index = 0
    5656    local returnvalue = false
  • code/branches/storymodeHS14/data/tcl

    • Property svn:ignore set to
      campaign.txt
  • code/branches/storymodeHS14/src/orxonox/gametypes/Mission.cc

    r10249 r10251  
    2828
    2929#include "Mission.h"
     30
     31#include <boost/filesystem.hpp>
     32
    3033#include "items/Engine.h"
    3134#include "controllers/ArtificialController.h"
     
    108111        {
    109112            this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
     113
     114            boost::filesystem::path filepath("campaign.txt");
    110115            std::fstream myfile;
    111             myfile.open("/home/maxima/maxima-extra-0/orxonox/storymodeHS14/campaign.txt");
     116            myfile.open(filepath.string().c_str(), std::fstream::out);
     117
    112118            std::string line;
    113119            std::string mission = this->getFilename();
     
    126132                    if (line == mission + " 0" + helperstring)
    127133                    {
    128                         long pos = myfile.tellp();
     134                        long pos = (long) myfile.tellp();
    129135                        myfile.seekp(pos - 61);
    130136                        myfile << mission + " 1" + helperstring;
    131137                    }
    132138                }
     139            } else {
     140                orxout(internal_warning) << "failed to open campaign file" << endl;
    133141            }
    134142            myfile.flush();
Note: See TracChangeset for help on using the changeset viewer.