From 641da4ba5602bab75ccc863b9808e0c071e32670 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Sun, 16 Aug 2020 19:42:35 -0400 Subject: [PATCH] Intialize regionMap --- server/plugin/gamemap/gamemap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugin/gamemap/gamemap.go b/server/plugin/gamemap/gamemap.go index f714204..e2cc927 100644 --- a/server/plugin/gamemap/gamemap.go +++ b/server/plugin/gamemap/gamemap.go @@ -19,9 +19,9 @@ func (m WorldMap) GetTile(x int, y int) (int, error) { } func (m WorldMap) GetJsonRegion(start_x, end_x, start_y, end_y int) ([]byte, error) { - regionMap := make(map[int]map[int]int) + regionMap := map[int]map[int]int{} for x := start_x; x < end_x; x++ { - + regionMap[x] = map[int]int{} for y := start_y; y < end_y; y++ { if result, err := m.GetTile(x, y); err != nil { return nil, err