Skip to content

Commit

Permalink
Merge pull request #12 from General-101/master
Browse files Browse the repository at this point in the history
Launcher fixes
  • Loading branch information
num0005 authored Oct 22, 2021
2 parents ea9e324 + c6ea3f2 commit 4ee2c2e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Launcher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ private async void CompileLevel(string level_path, string bsp_path, string Level
var info = ToolkitBase.SplitStructureFilename(level_path, bsp_path);
var scen_path = Path.Combine(info.ScenarioPath, info.ScenarioName);
CancelableProgressBarWindow<int> progress = null;
if (halo_3 || (halo_2_mcc && lightmaps_args.instanceCount > 1))
if (halo_3 || ((halo_2_mcc || halo_2_standalone_community) && lightmaps_args.instanceCount > 1))
progress = new CancelableProgressBarWindow<int>();
try
{
Expand Down
6 changes: 4 additions & 2 deletions Launcher/ToolkitInterface/H2Toolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using static ToolkitLauncher.ToolkitProfiles;
using System.IO;
using System.Threading;
using System.Diagnostics;

namespace ToolkitLauncher.ToolkitInterface
{
Expand Down Expand Up @@ -59,7 +60,7 @@ public override async Task BuildLightmap(string scenario, string bsp, LightmapAr
{
string quality = GetLightmapQuality(args);

if (args.instanceCount > 1 && Profile.IsMCC || Profile.CommunityTools)
if (args.instanceCount > 1 && (Profile.IsMCC || Profile.CommunityTools)) // multi instance?
{
if (progress is not null)
progress.MaxValue += 1 + args.instanceCount;
Expand Down Expand Up @@ -105,12 +106,13 @@ async Task RunInstance(int index)
}
else
{
Debug.Assert(args.instanceCount == 1); // should be one, otherwise we got bad args
if (progress is not null)
{
progress.DisableCancellation();
progress.MaxValue += 1;
}
await RunTool(ToolType.Tool, new() { "lightmaps", scenario, bsp, quality });
await RunTool((args.NoAssert && Profile.IsMCC) ? ToolType.ToolFast : ToolType.Tool, new() { "lightmaps", scenario, bsp, quality });
if (progress is not null)
progress.Report(1);
}
Expand Down
6 changes: 3 additions & 3 deletions Launcher/ToolkitInterface/H3Toolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ private static string GetLightmapQuality(LightmapArgs lightmapArgs)
return lightmapArgs.level_combobox.ToLower();
}

public async Task FauxSync(string scenario, string bsp, bool instanceOutput)
public async Task FauxSync(string scenario, string bsp, bool instanceOutput, bool useFast)
{
await RunTool(ToolType.Tool, new() { "faux_data_sync", scenario, bsp }, instanceOutput);
await RunTool(useFast ? ToolType.ToolFast : ToolType.Tool, new() { "faux_data_sync", scenario, bsp }, instanceOutput);
}

private static int FauxCalculateJobID(string scenario, string bsp)
Expand All @@ -83,7 +83,7 @@ public async Task FauxLocalFarm(string scenario, string bsp, string lightmapGrou

// first sync
progress.Status = "Syncing faux (this might take a while)...";
await FauxSync(scenario, bsp, instanceOutput);
await FauxSync(scenario, bsp, instanceOutput, useFast);
progress.Report(1);

int jobID = FauxCalculateJobID(scenario, bsp);
Expand Down

0 comments on commit 4ee2c2e

Please sign in to comment.