diff --git a/project/code/TMV/Mission.cs b/project/code/TMV/Mission.cs index cad5774..eec2a2d 100644 --- a/project/code/TMV/Mission.cs +++ b/project/code/TMV/Mission.cs @@ -39,6 +39,8 @@ public partial class Mission : Node3D [Export] public bool Dump = false; + string _campaignName; + string _missionName; ResourcePathManager _installPaths; DbFile _file; TextureLoader _textureLoader; @@ -51,6 +53,8 @@ public partial class Mission : Node3D missionSelector.pathManager = _installPaths; missionSelector.MissionSelected += (string campaign, string mission) => { + _campaignName = campaign; + _missionName = mission; FileName = _installPaths.GetMissionPath(campaign, mission); Build = true; }; @@ -94,8 +98,7 @@ public partial class Mission : Node3D ClearMap(); // TODO: This shouldn't be set for things that aren't actually FMs - var fmName = FileName.GetBaseDir().GetFile(); - _textureLoader = new TextureLoader(fmName); + _textureLoader = new TextureLoader(_campaignName); _file = new(FileName); UseChunk("TXLIST", LoadTextures); UseChunk("WREXT", BuildWrMeshes);