Added a fix for AFM loading

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@587 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
celest 2004-12-16 18:05:17 +00:00
parent af796eb386
commit 584745ca2f
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Date Added Date Added
12/16 12/16
* Added a fix for AFM loading, thanks to Pete [celest]
* Updated maximum levels for supernovice to 99 [celest] * Updated maximum levels for supernovice to 99 [celest]
* Updated supernovice jobexp table - should be same from 50 onwards [celest] * Updated supernovice jobexp table - should be same from 50 onwards [celest]
* Corrected maximum job level checking in @joblvup and @charjob [celest] * Corrected maximum job level checking in @joblvup and @charjob [celest]

View File

@ -1670,10 +1670,13 @@ int map_readallmap(void) {
for(i=0;i<map_num;i++){ for(i=0;i<map_num;i++){
#ifdef USE_AFM #ifdef USE_AFM
char afm_name[256] = ""; char afm_name[256] = "";
char *p;
strncpy(afm_name, map[i].name, strlen(map[i].name) - 4); strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
strcat(afm_name, ".afm"); strcat(afm_name, ".afm");
sprintf(fn,"%s\\%s",afm_dir,afm_name); sprintf(fn,"%s\\%s",afm_dir,afm_name);
for(p=&fn[0];*p!=0;p++) if (*p=='\\') *p = '/'; // * At the time of Unix
afm_file = fopen(fn, "r"); afm_file = fopen(fn, "r");
if (afm_file != NULL) { if (afm_file != NULL) {
map_readafm(i,fn); map_readafm(i,fn);