Skip to content

Commit

Permalink
Fix for structures size 3,6,9 etc...
Browse files Browse the repository at this point in the history
  • Loading branch information
indilo53 committed Nov 1, 2018
1 parent 5dfb6f0 commit 513b703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RageLib.GTA5/Resources/PC/Meta/MetaUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public static T[] ConvertDataArray<T>(MetaFile meta, uint pointer, uint count) w

int byteoffset = (int)ptrOffset;
int itemoffset = byteoffset / itemSize;
int mod = byteoffset % itemSize;

int c = 0;

Expand All @@ -172,7 +173,7 @@ public static T[] ConvertDataArray<T>(MetaFile meta, uint pointer, uint count) w

for (int i = 0; i < itemcount; i++)
{
int offset = (itemoffset + i) * itemSize;
int offset = (itemoffset + i) * itemSize + (mod % 4);
int index = c + i;
items[index] = ConvertData<T>(ptrblock, offset);
}
Expand Down

0 comments on commit 513b703

Please sign in to comment.