mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 21:11:39 +00:00
Fixed: Start client from server root directory
This commit is contained in:
parent
ddcbd3ff21
commit
5a37077a96
1 changed files with 3 additions and 2 deletions
|
@ -92,6 +92,7 @@ void CMainWindow::onPlayClicked()
|
||||||
CConfigFile *config = CConfigFile::getInstance();
|
CConfigFile *config = CConfigFile::getInstance();
|
||||||
|
|
||||||
const CProfile &profile = config->getProfile(profileIndex);
|
const CProfile &profile = config->getProfile(profileIndex);
|
||||||
|
const CServer &server = config->getServer(profile.server);
|
||||||
|
|
||||||
// get full path of client executable
|
// get full path of client executable
|
||||||
QString executable = config->getProfileClientFullPath(profileIndex);
|
QString executable = config->getProfileClientFullPath(profileIndex);
|
||||||
|
@ -104,8 +105,8 @@ void CMainWindow::onPlayClicked()
|
||||||
arguments << profile.id;
|
arguments << profile.id;
|
||||||
arguments << profile.arguments.split(' ');
|
arguments << profile.arguments.split(' ');
|
||||||
|
|
||||||
// launch the game with all arguments
|
// launch the game with all arguments and from server root directory (to use right data)
|
||||||
bool started = QProcess::startDetached(executable, arguments);
|
bool started = QProcess::startDetached(executable, arguments, server.getDirectory());
|
||||||
|
|
||||||
// define this profile as default one
|
// define this profile as default one
|
||||||
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
|
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
|
||||||
|
|
Loading…
Reference in a new issue