Fix honeytree group get

byte 6 sets 0/1/2/3, which is used for the editor
byte 5 says which sub-table to use (0/1/2) if there is something on the
tree.
Closes #1283
This commit is contained in:
Kurt
2017-06-29 09:09:59 -07:00
parent 587d0ea9fc
commit e373db99c1

View File

@@ -10,8 +10,8 @@ public class HoneyTree
public uint Time { get => BitConverter.ToUInt32(Data, 0); set => BitConverter.GetBytes(value).CopyTo(Data, 0); }
public int Slot { get => Data[4]; set => Data[4] = (byte)value; }
public int Group { get => Data[5]; set { Data[5] = (byte)value; X = Group+1; } }
public int X { get => Data[6]; set => Data[6] = (byte)value; }
public int SubTable { get => Data[5]; set => Data[5] = (byte)value; } // offset by 1 with respect to Group
public int Group { get => Data[6]; set { Data[6] = (byte)value; SubTable = Math.Max(0, Group - 1); } }
public int Shake { get => Data[7]; set => Data[7] = (byte)value; }
public HoneyTree(byte[] data)