summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-16 18:05:17 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-16 18:05:17 +0000
commitce1639425f86841046e6929a6560309e134189b2 (patch)
tree8df9acb062732ccb1fbb087962e1748abfe722f2
parent2a31aa65c6c41b57182292769618d287c3eae560 (diff)
downloadhercules-ce1639425f86841046e6929a6560309e134189b2.tar.gz
hercules-ce1639425f86841046e6929a6560309e134189b2.tar.bz2
hercules-ce1639425f86841046e6929a6560309e134189b2.tar.xz
hercules-ce1639425f86841046e6929a6560309e134189b2.zip
Added a fix for AFM loading
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@587 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt1
-rw-r--r--src/map/map.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/Changelog.txt b/Changelog.txt
index ff7028db1..4aecde3cd 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
12/16
+ * Added a fix for AFM loading, thanks to Pete [celest]
* Updated maximum levels for supernovice to 99 [celest]
* Updated supernovice jobexp table - should be same from 50 onwards [celest]
* Corrected maximum job level checking in @joblvup and @charjob [celest]
diff --git a/src/map/map.c b/src/map/map.c
index 31bb76370..4f16881b0 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1670,10 +1670,13 @@ int map_readallmap(void) {
for(i=0;i<map_num;i++){
#ifdef USE_AFM
char afm_name[256] = "";
+ char *p;
strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
strcat(afm_name, ".afm");
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");
if (afm_file != NULL) {
map_readafm(i,fn);