From 0f0b235d2a1091ac860cb6d45b4e90a17f06515e Mon Sep 17 00:00:00 2001 From: Will Date: Mon, 2 Nov 2015 22:46:24 -0700 Subject: [PATCH] Fix CSProj file. Fix bug in game lump info reading giving nonsense data for game lump offset and length. Fix bug in Static Prop lump reading causing prop model dictionary to always be null. --- LibBSP/LibBSP.csproj | 98 +++++++++---------- LibBSP/Source/Structs/BSP/Lumps/GameLump.cs | 4 +- .../Structs/BSP/Lumps/SourceStaticProps.cs | 2 +- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/LibBSP/LibBSP.csproj b/LibBSP/LibBSP.csproj index c73d125..be37cf4 100644 --- a/LibBSP/LibBSP.csproj +++ b/LibBSP/LibBSP.csproj @@ -40,56 +40,56 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LibBSP/Source/Structs/BSP/Lumps/GameLump.cs b/LibBSP/Source/Structs/BSP/Lumps/GameLump.cs index f1ac87c..c27fb53 100644 --- a/LibBSP/Source/Structs/BSP/Lumps/GameLump.cs +++ b/LibBSP/Source/Structs/BSP/Lumps/GameLump.cs @@ -87,8 +87,8 @@ namespace LibBSP { GameLumpInfo info = new GameLumpInfo { flags = BitConverter.ToUInt16(data, (i * structLength) + 8), version = BitConverter.ToUInt16(data, (i * structLength) + 10), - offset = BitConverter.ToInt32(data, (i * structLength) + 14), - length = BitConverter.ToInt32(data, (i * structLength) + 18), + offset = BitConverter.ToInt32(data, (i * structLength) + 12), + length = BitConverter.ToInt32(data, (i * structLength) + 16), }; this[(GameLumpType)BitConverter.ToInt32(data, (i * structLength) + 4)] = info; diff --git a/LibBSP/Source/Structs/BSP/Lumps/SourceStaticProps.cs b/LibBSP/Source/Structs/BSP/Lumps/SourceStaticProps.cs index 01ba8ed..c733776 100644 --- a/LibBSP/Source/Structs/BSP/Lumps/SourceStaticProps.cs +++ b/LibBSP/Source/Structs/BSP/Lumps/SourceStaticProps.cs @@ -21,7 +21,7 @@ namespace LibBSP { throw new ArgumentNullException(); } int structLength = 0; - string[] dictionary = new string[0]; + dictionary = new string[0]; if (data.Length > 0) { int offset = 0; dictionary = new string[BitConverter.ToInt32(data, 0)];