… | |
… | |
88 | $setup{$k} = $ns->itemcmd; |
88 | $setup{$k} = $ns->itemcmd; |
89 | |
89 | |
90 | } elsif ($k eq "mapsize") { |
90 | } elsif ($k eq "mapsize") { |
91 | my ($x, $y) = split /x/, $v; |
91 | my ($x, $y) = split /x/, $v; |
92 | |
92 | |
|
|
93 | # we *need* to make sure we use an odd map size, as the remaining |
|
|
94 | # code relies on this. |
93 | $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, ($x - 1) | 1); |
95 | $ns->mapx ($x = max 9, min +(cf::MAP_CLIENT_X - 1) | 1, ($x - 1) | 1); |
94 | $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, ($y - 1) | 1); |
96 | $ns->mapy ($y = max 9, min +(cf::MAP_CLIENT_Y - 1) | 1, ($y - 1) | 1); |
95 | |
97 | |
96 | $setup{$k} = "${x}x${y}"; |
98 | $setup{$k} = "${x}x${y}"; |
97 | |
99 | |
98 | } elsif ($k eq "extendedMapInfos") { |
100 | } elsif ($k eq "extendedMapInfos") { |
99 | $ns->ext_mapinfos ($v); |
101 | $ns->ext_mapinfos ($v); |