Skip to content
This repository was archived by the owner on Sep 16, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions Sledge.Editor/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -577,26 +577,26 @@ private void CompileFinished(Batch batch)
{
return;
}
var exe = batch.Game.GetExecutable();
if (!File.Exists(exe))
{
MessageBox.Show(
"The location of the game executable is incorrect. Please ensure that the game configuration has been set up correctly.",
"Failed to launch!", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
var exe = batch.Game.GetExecutable();
if (!File.Exists(exe))
{
MessageBox.Show(
"The location of the game executable is incorrect. Please ensure that the game configuration has been set up correctly.",
"Failed to launch!", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

var flags = String.Format("{0} +map \"{1}\" {2}", batch.Game.GetGameLaunchArgument(), batch.MapFileName, batch.Game.ExecutableParameters);
try
{
Process.Start(exe, flags);
}
catch (Exception ex)
{
MessageBox.Show("Launching game failed: " + ex.Message, "Failed to launch!",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
var flags = String.Format("{0} +map \"{1}\" {2}", batch.Game.GetGameLaunchArgument(), batch.MapFileName, batch.Game.ExecutableParameters);
try
{
Process.Start(exe, flags);
}
catch (Exception ex)
{
MessageBox.Show("Launching game failed: " + ex.Message, "Failed to launch!",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
}
Expand Down