From d5d013ad32a1d383ce691b94592c16a3de909877 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 23 Nov 2009 16:33:01 +1300 Subject: [PATCH] Use main.mix, if it exists. --- OpenRa.FileFormats/Package.cs | 3 ++- OpenRa.Game/MainWindow.cs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenRa.FileFormats/Package.cs b/OpenRa.FileFormats/Package.cs index cda9f79e20..3c86266141 100644 --- a/OpenRa.FileFormats/Package.cs +++ b/OpenRa.FileFormats/Package.cs @@ -38,9 +38,10 @@ namespace OpenRa.FileFormats return; } } + else + s.Seek( 0, SeekOrigin.Begin ); isEncrypted = false; - s.Seek(0, SeekOrigin.Begin); index = ParseTdHeader(s, out dataStart).ToDictionary(x => x.Hash); } diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index e0b2702bf5..957eccef2d 100755 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -26,7 +26,9 @@ namespace OpenRa.Game public MainWindow(Settings settings) { - FileSystem.Mount(new Folder("../../../../")); + FileSystem.Mount( new Folder( "../../../../" ) ); + if( File.Exists( "../../../../main.mix" ) ) + FileSystem.Mount(new Package("main.mix")); FileSystem.Mount(new Package("redalert.mix")); FileSystem.Mount(new Package("conquer.mix")); FileSystem.Mount(new Package("hires.mix"));