diff --git a/Client/UUoaDesigns.pas b/Client/UUoaDesigns.pas index c1008fd..ce49ecd 100644 --- a/Client/UUoaDesigns.pas +++ b/Client/UUoaDesigns.pas @@ -62,6 +62,9 @@ type implementation +uses + Math; + function ReadString(AStream: TStream): String; var nonNullFlag: Byte; @@ -104,7 +107,7 @@ begin tile.TileID := ReadInt; tile.X := ReadInt; tile.Y := ReadInt; - tile.Z := ReadInt; + tile.Z := EnsureRange(ReadInt, -128, 127); ReadInt; // Level; unused if version = 1 then