diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-10 13:34:09 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-10 13:34:09 +0000 |
commit | b65489621d576c6376a7758024a89ce2d1d54273 (patch) | |
tree | a37d58f0b608f34124936137115272c4d76d343f /src | |
parent | f5a7fa8adb4e259a956fe82f41639f528bd70ada (diff) | |
download | hercules-b65489621d576c6376a7758024a89ce2d1d54273.tar.gz hercules-b65489621d576c6376a7758024a89ce2d1d54273.tar.bz2 hercules-b65489621d576c6376a7758024a89ce2d1d54273.tar.xz hercules-b65489621d576c6376a7758024a89ce2d1d54273.zip |
* Fixed players unable to move in AFM maps
* Added error message if a player's last map couldn't be found
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@535 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 242462a5a..b425ead03 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -779,7 +779,13 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars sd->eventtimer[i] = -1; // 位置の設定 - pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, 0); + if (pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, 0) != 0) { + if(battle_config.error_log) { + char buf[32]; + sprintf(buf, "Last_point_map %s not found\n", sd->status.last_point.map); + ShowError (buf); + } + } // pet if (sd->status.pet_id > 0) @@ -3765,11 +3771,17 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt memcpy(mapname,mapname_org,24); mapname[16]=0; - if(strstr(mapname,".gat")==NULL && strlen(mapname)<16){ + if(strstr(mapname,".gat")==NULL && strstr(mapname,".afm")==NULL && strlen(mapname)<16){ strcat(mapname,".gat"); } - m=map_mapname2mapid(mapname); + // If we can't find the .gat map try .afm instead [celest] + if ((m=map_mapname2mapid(mapname))<0) { + char afm_name[16] = ""; + strncpy(afm_name, mapname, strlen(mapname) - 4); + strcat(afm_name, ".afm"); + m=map_mapname2mapid(afm_name); + } if(m<0){ if(sd->mapname[0]){ int ip,port; |