Code:
public IDMap Deserialize() {
var dMap = new DMap();
br = new BinaryReader(new FileStream(path, FileMode.Open));
dMap.Version = br.ReadBytes(8);
dMap.pulPath = Encoding.ASCII.GetString(br.ReadBytes(260)).Split('\0')[0];
dMap.Height = br.ReadInt32();
dMap.Width = br.ReadInt32();
dMap.Cells = new MapCell[dMap.Height, dMap.Width];
for (int x = 0; x < dMap.Height; x++) {
for (int y = 0; y < dMap.Width; y++) {
dMap.Cells[x, y].Walkable = Convert.ToBoolean(br.ReadInt16());
br.ReadInt32();
}
br.ReadInt32();
}
br.Close();
return dMap;
}
Solved: I was not inverting the walkable!






