summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-07 23:36:00 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-07 23:36:00 +0000
commit4b6a4b4c9eb141f618cb59cb9a6878a6fe6caf83 (patch)
treea26c30148a38b374f6faa391adf5b5aeceb122a9
parent2b86d531215226674273cc168863961d293aea21 (diff)
downloadhercules-4b6a4b4c9eb141f618cb59cb9a6878a6fe6caf83.tar.gz
hercules-4b6a4b4c9eb141f618cb59cb9a6878a6fe6caf83.tar.bz2
hercules-4b6a4b4c9eb141f618cb59cb9a6878a6fe6caf83.tar.xz
hercules-4b6a4b4c9eb141f618cb59cb9a6878a6fe6caf83.zip
Added support to pre-re/re map_cache since some maps differ, this results in map servers' map_cache_file config being dropped.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16867 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--conf/map_athena.conf3
-rw-r--r--db/pre-re/map_cache.dat (renamed from db/map_cache.dat)bin2014060 -> 2014060 bytes
-rw-r--r--db/re/map_cache.datbin0 -> 2014060 bytes
-rw-r--r--src/map/map.c17
4 files changed, 7 insertions, 13 deletions
diff --git a/conf/map_athena.conf b/conf/map_athena.conf
index cc686a83c..5caa65c47 100644
--- a/conf/map_athena.conf
+++ b/conf/map_athena.conf
@@ -65,9 +65,6 @@ console_msg_log: 0
//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
console_silent: 0
-//Where should the map data be read from?
-map_cache_file: db/map_cache.dat
-
//Where should all database data be read from?
db_path: db
diff --git a/db/map_cache.dat b/db/pre-re/map_cache.dat
index 96650c31b..96650c31b 100644
--- a/db/map_cache.dat
+++ b/db/pre-re/map_cache.dat
Binary files differ
diff --git a/db/re/map_cache.dat b/db/re/map_cache.dat
new file mode 100644
index 000000000..96650c31b
--- /dev/null
+++ b/db/re/map_cache.dat
Binary files differ
diff --git a/src/map/map.c b/src/map/map.c
index de7b34d93..e783c3df1 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -148,7 +148,6 @@ struct map_cache_map_info {
int32 len;
};
-char map_cache_file[256]="db/map_cache.dat";
char db_path[256] = "db";
char motd_txt[256] = "conf/motd.txt";
char help_txt[256] = "conf/help.txt";
@@ -3052,19 +3051,19 @@ int map_readallmaps (void)
if( enable_grf )
ShowStatus("Loading maps (using GRF files)...\n");
- else
- {
- ShowStatus("Loading maps (using %s as map cache)...\n", map_cache_file);
- if( (fp = fopen(map_cache_file, "rb")) == NULL )
- {
- ShowFatalError("Unable to open map cache file "CL_WHITE"%s"CL_RESET"\n", map_cache_file);
+ else {
+ char mapcachefilepath[254];
+ sprintf(mapcachefilepath,"%s/%s%s",db_path,DBPATH,"map_cache.dat");
+ ShowStatus("Loading maps (using %s as map cache)...\n", mapcachefilepath);
+ if( (fp = fopen(mapcachefilepath, "rb")) == NULL ) {
+ ShowFatalError("Unable to open map cache file "CL_WHITE"%s"CL_RESET"\n", mapcachefilepath);
exit(EXIT_FAILURE); //No use launching server if maps can't be read.
}
// Init mapcache data.. [Shinryo]
map_cache_buffer = map_init_mapcache(fp);
if(!map_cache_buffer) {
- ShowFatalError("Failed to initialize mapcache data (%s)..\n", map_cache_file);
+ ShowFatalError("Failed to initialize mapcache data (%s)..\n", mapcachefilepath);
exit(EXIT_FAILURE);
}
}
@@ -3306,8 +3305,6 @@ int map_config_read(char *cfgName)
strcpy(help2_txt, w2);
else if (strcmpi(w1, "charhelp_txt") == 0)
strcpy(charhelp_txt, w2);
- else if(strcmpi(w1,"map_cache_file") == 0)
- strncpy(map_cache_file,w2,255);
else if(strcmpi(w1,"db_path") == 0)
strncpy(db_path,w2,255);
else if (strcmpi(w1, "console") == 0) {