Name the files that cause crashes.

This commit is contained in:
Matthias Mailänder
2020-08-15 15:51:57 +02:00
committed by Paul Chote
parent e90fc1ef39
commit 9d181e88d2
2 changed files with 4 additions and 3 deletions

View File

@@ -35,10 +35,10 @@ namespace OpenRA.Mods.Cnc.Graphics
uint IModel.Frames { get { return frames; } } uint IModel.Frames { get { return frames; } }
uint IModel.Sections { get { return limbs; } } uint IModel.Sections { get { return limbs; } }
public Voxel(VoxelLoader loader, VxlReader vxl, HvaReader hva) public Voxel(VoxelLoader loader, VxlReader vxl, HvaReader hva, (string Vxl, string Hva) files)
{ {
if (vxl.LimbCount != hva.LimbCount) if (vxl.LimbCount != hva.LimbCount)
throw new InvalidOperationException("Voxel and hva limb counts don't match"); throw new InvalidOperationException("{0}.vxl and {1}.hva limb counts don't match.".F(files.Vxl, files.Hva));
transforms = hva.Transforms; transforms = hva.Transforms;
frames = hva.FrameCount; frames = hva.FrameCount;

View File

@@ -216,9 +216,10 @@ namespace OpenRA.Mods.Cnc.Graphics
HvaReader hva; HvaReader hva;
using (var s = fileSystem.Open(files.Vxl + ".vxl")) using (var s = fileSystem.Open(files.Vxl + ".vxl"))
vxl = new VxlReader(s); vxl = new VxlReader(s);
using (var s = fileSystem.Open(files.Hva + ".hva")) using (var s = fileSystem.Open(files.Hva + ".hva"))
hva = new HvaReader(s, files.Hva + ".hva"); hva = new HvaReader(s, files.Hva + ".hva");
return new Voxel(this, vxl, hva); return new Voxel(this, vxl, hva, files);
} }
public Voxel Load(string vxl, string hva) public Voxel Load(string vxl, string hva)