Skip to content

Commit

Permalink
Merge pull request #47 from General-101/master
Browse files Browse the repository at this point in the history
Fixes for lightmapper issues in Reach
  • Loading branch information
Steven Garcia authored Jan 9, 2023
2 parents 9ea640f + e1a7ba6 commit ce84368
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions Launcher/Documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
"H3": {
"Packaging": "h3/tools/h3-ek/h3-tool/#build-cache-file",
"Lighting": "h3/tools/h3-ek/h3-tool/#baking-lightmaps-faux"
},
"HR": {
"Packaging": "hr/hr-ek/hr-tool/#build-cache-file-cache",
"Lighting": "hr/hr-ek/hr-tool/#baking-lightmaps-faux"
},
"H4": {

},
"H2A": {
"Base": "H4"
}
}
}
4 changes: 2 additions & 2 deletions Launcher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ private void level_compile_Click(object sender, RoutedEventArgs e)
// tool doesn't support a value of 0 or 1, the bounds are [0, 1], so we adjust the value a bit to get something reasonable
float light_level_slider = (float)Math.Max(Math.Min(light_quality_slider.ConvertedValue, 0.999999), 0.000001);
int instance_count = 1;
if (!halo_ce && !halo_2_standalone_stock && !halo_reach && !halo_4)
if (!halo_ce && !halo_2_standalone_stock && !halo_4)
{
if (instance_value.Text.Length == 0 ? true : Int32.TryParse(instance_value.Text, out instance_count))
{
Expand Down Expand Up @@ -1034,7 +1034,7 @@ private async void CompileLevel(string level_path, string bsp_path, string Level
var info = ToolkitBase.SplitStructureFilename(level_path, bsp_path, Path.GetDirectoryName(toolkit_profile.ToolPath));
var scen_path = Path.Combine(info.ScenarioPath, info.ScenarioName);
CancelableProgressBarWindow<int> progress = null;
if (!halo_ce && !halo_2_standalone_stock && !halo_reach && !halo_4 && lightmaps_args.instanceCount > 1 || !halo_ce && !halo_2 && !halo_reach && !halo_4)
if (lightmaps_args.instanceCount > 1 || halo_3 || halo_reach)
{
progress = new CancelableProgressBarWindow<int>();
progress.Owner = this;
Expand Down
2 changes: 1 addition & 1 deletion Launcher/ToolkitInterface/H3Toolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public enum StageResult
MergeFail
};

public async Task FauxLocalFarm(string scenario, string bsp, string lightmapGroup, string quality, int clientCount, bool useFast, bool instanceOutput, ICancellableProgress<int> progress)
public virtual async Task FauxLocalFarm(string scenario, string bsp, string lightmapGroup, string quality, int clientCount, bool useFast, bool instanceOutput, ICancellableProgress<int> progress)
{
progress.MaxValue += 1 + 1 + 5 * (clientCount + 1) + 1 + 3;

Expand Down
2 changes: 1 addition & 1 deletion Launcher/ToolkitInterface/HRToolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ override public async Task ImportStructure(StructureType structure_command, stri
await RunTool(tool, args, true);
}

public new async Task FauxLocalFarm(string scenario, string bsp, string lightmapGroup, string quality, int clientCount, bool useFast, bool instanceOutput, ICancellableProgress<int> progress)
override public async Task FauxLocalFarm(string scenario, string bsp, string lightmapGroup, string quality, int clientCount, bool useFast, bool instanceOutput, ICancellableProgress<int> progress)
{
progress.MaxValue += 1 + 1 + 5 * (clientCount + 1) + 1 + 3;

Expand Down

0 comments on commit ce84368

Please sign in to comment.