diff options
author | Haruna <haru@dotalux.com> | 2014-12-06 18:25:14 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2014-12-06 18:25:14 +0100 |
commit | 738e39d33186a4ff1a620509a7c13d986ff43ecb (patch) | |
tree | e5176f3de9e227a8d76aee17c07165b1b7deccde /src/common/mapindex.c | |
parent | 04d981077de4bc5d6d0cf69a946091add1dc9309 (diff) | |
parent | 2f9c0cc0c00339d2098907ad5542226b12e0f9f4 (diff) | |
download | hercules-738e39d33186a4ff1a620509a7c13d986ff43ecb.tar.gz hercules-738e39d33186a4ff1a620509a7c13d986ff43ecb.tar.bz2 hercules-738e39d33186a4ff1a620509a7c13d986ff43ecb.tar.xz hercules-738e39d33186a4ff1a620509a7c13d986ff43ecb.zip |
Merge pull request #403 from 4144/mapext
into mapindex add variable with default map and position.
Diffstat (limited to 'src/common/mapindex.c')
-rw-r--r-- | src/common/mapindex.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/mapindex.c b/src/common/mapindex.c index e00fc107d..0d8a69726 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -172,8 +172,8 @@ int mapindex_init(void) { bool mapindex_check_default(void) { - if (!strdb_iget(mapindex->db, MAP_DEFAULT)) { - ShowError("mapindex_init: MAP_DEFAULT '%s' not found in cache! update mapindex.h MAP_DEFAULT var!!!\n",MAP_DEFAULT); + if (!strdb_iget(mapindex->db, mapindex->default_map)) { + ShowError("mapindex_init: MAP_DEFAULT '%s' not found in cache! update mapindex.h MAP_DEFAULT var!!!\n", mapindex->default_map); return false; } return true; @@ -196,6 +196,9 @@ void mapindex_defaults(void) { /* */ mapindex->db = NULL; mapindex->num = 0; + mapindex->default_map = MAP_DEFAULT; + mapindex->default_x = MAP_DEFAULT_X; + mapindex->default_y = MAP_DEFAULT_Y; memset (&mapindex->list, 0, sizeof (mapindex->list)); /* */ |