From ded1f674755335a9cbb5c08e321b4a4c092a0e8d Mon Sep 17 00:00:00 2001 From: DracoRPG Date: Fri, 6 Apr 2007 17:22:40 +0000 Subject: I'm still here! Rewrote fame ranking lists- changed MAP_NAME_LENGTH to 12, now there's MAP_NAME_LENGTH_EXT at 16 for uses where there is / may be the .gat extension, code adjusted accordingly - moved map_normalize_name to mapindex_normalize_name so that everything handling map names uses the same extension-removing function - greatly enhanced the map cache generator, complete documentation on the tool and the map cache format can be found in doc/ - the map cache format changed a bit as a consequence, but of course a new valid one is included (contains latest Nameless Island maps) - fixed a duplicate entry in map index git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10167 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/char.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index 371303c87..46379bf30 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1605,10 +1605,6 @@ void create_online_files(void) { if (online_display_option & 24) { // 8 or 16 // prepare map name memcpy(temp, mapindex_id2name(char_dat[j].status.last_point.map), MAP_NAME_LENGTH); - temp[MAP_NAME_LENGTH] = '\0'; - if (strstr(temp, ".gat") != NULL) { - temp[strstr(temp, ".gat") - temp] = 0; // suppress the '.gat' - } // write map name if (online_display_option & 16) { // map-name AND coordinates fprintf(fp2, " %s (%d, %d)\n", temp, char_dat[j].status.last_point.x, char_dat[j].status.last_point.y); @@ -3532,13 +3528,13 @@ int parse_char(int fd) { //Send player to map uint32 subnet_map_ip; - char map_name[MAP_NAME_LENGTH]; - snprintf(map_name, MAP_NAME_LENGTH, "%s.gat", mapindex_id2name(cd->last_point.map)); + char map_name[MAP_NAME_LENGTH_EXT]; + snprintf(map_name, MAP_NAME_LENGTH_EXT, "%s.gat", mapindex_id2name(cd->last_point.map)); WFIFOHEAD(fd,28); WFIFOW(fd,0) = 0x71; WFIFOL(fd,2) = cd->char_id; - memcpy(WFIFOP(fd,6), map_name, MAP_NAME_LENGTH); + memcpy(WFIFOP(fd,6), map_name, MAP_NAME_LENGTH_EXT); // Advanced subnet check [LuzZza] subnet_map_ip = lan_subnetcheck(ipl); -- cgit v1.2.3-70-g09d2