Compare commits

..

No commits in common. "9605c36303972e0399dcbb6f14592c033bf82ad5" and "261d5fe399bf0c52458a1e36f38df06edde183ad" have entirely different histories.

1 changed files with 7 additions and 12 deletions

View File

@ -66,7 +66,7 @@ public partial class Mission : Node3D
{
if (Build)
{
Timing.TimeStage("Build", () => RebuildMap());
RebuildMap();
Build = false;
}
if (Clear)
@ -104,16 +104,7 @@ public partial class Mission : Node3D
Timing.TimeStage("Load FAM", () => UseChunk<TxList>("TXLIST", LoadTextures));
Timing.TimeStage("Build WR", () => UseChunk<WorldRep>("WREXT", BuildWrMeshes));
if (_file.Chunks.TryGetValue("BRLIST", out var brList))
{
var objHierarchy = Timing.TimeStage("Hierarchy", BuildHierarchy);
Timing.TimeStage("Object Placement", () => PlaceObjects((BrList)brList, objHierarchy));
}
}
// TODO: Make this less of a mess
private ObjectHierarchy BuildHierarchy()
{
// TODO: Sort this out so I can time it lol
ObjectHierarchy objHierarchy;
if (_file.Chunks.TryGetValue("GAM_FILE", out var gamFileChunk))
{
@ -134,7 +125,11 @@ public partial class Mission : Node3D
{
objHierarchy = new ObjectHierarchy(_file);
}
return objHierarchy;
if (_file.Chunks.TryGetValue("BRLIST", out var brList))
{
Timing.TimeStage("Object Placement", () => PlaceObjects((BrList)brList, objHierarchy));
}
}
private void UseChunk<T>(string name, Action<T> action)