Mercurial > hg > batmud > maputils
changeset 1926:36cab5b2e590
Add 'X' to centering and cleanup characters in mapsearch.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Nov 2017 11:33:07 +0200 |
parents | c68b816c9b55 |
children | 2669add486a7 |
files | mapsearch.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mapsearch.c Thu Nov 09 04:51:37 2017 +0200 +++ b/mapsearch.c Thu Nov 09 11:33:07 2017 +0200 @@ -894,7 +894,7 @@ void mapPerformSearch(struct lws *wsi, const unsigned char *data, const size_t len, char **verr) { - static const char *cleanChars = " *@?%C"; + static const char *cleanChars = " *@?%CX"; size_t ncleanChars = strlen(cleanChars); int width, height, centerX, centerY; MapBlock *pattern = NULL; @@ -1043,10 +1043,10 @@ } // Find pattern center marker, if any - centerFound = mapBlockFindCenter(pattern, (unsigned char*) "*@", 2, ¢erX, ¢erY, 20); + centerFound = mapBlockFindCenter(pattern, (unsigned char*) "*@X", 2, ¢erX, ¢erY, 20); if (centerFound) - mapMSG(2, "Center @ %d, %d\n", centerX, centerY); + mapMSG(2, "Center at %d, %d\n", centerX, centerY); // Clean the pattern from characters we do not want to match mapBlockClean(pattern, (unsigned char *) cleanChars, ncleanChars);