summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-14 20:14:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-14 20:14:58 +0000
commit1a265168a17cc7ff4a6ec0f5f4814d661c411202 (patch)
tree4066547901289553dc5a3648c97195977f962373 /src/map/map.c
parent5a6f4e191743aca6fe6f4bbb3e371df4fe9a7100 (diff)
downloadhercules-1a265168a17cc7ff4a6ec0f5f4814d661c411202.tar.gz
hercules-1a265168a17cc7ff4a6ec0f5f4814d661c411202.tar.bz2
hercules-1a265168a17cc7ff4a6ec0f5f4814d661c411202.tar.xz
hercules-1a265168a17cc7ff4a6ec0f5f4814d661c411202.zip
- Removed support for negative autosave intervals, instead added a minsave_interval setting which specifies which is the minimum time between character saves. Default to 100ms (map_athena.conf).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8280 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 93508d966..70dc79cac 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -169,6 +169,7 @@ int map_num = 0;
int map_port=0;
int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
+int minsave_interval = 100;
int save_settings = 0xFFFF;
int charsave_method = 0; //Default 'OLD' Save method (SQL ONLY!) [Sirius]
int agit_flag = 0;
@@ -3314,9 +3315,14 @@ int map_config_read(char *cfgName) {
npc_delsrcfile(w2);
} else if (strcmpi(w1, "autosave_time") == 0) {
autosave_interval = atoi(w2);
- if (!autosave_interval) //Revert to default saving.
+ if (autosave_interval < 1) //Revert to default saving.
autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
- autosave_interval *= 1000; //Pass from sec to ms
+ else
+ autosave_interval *= 1000; //Pass from sec to ms
+ } else if (strcmpi(w1, "minsave_time") == 0) {
+ minsave_interval= atoi(w2);
+ if (minsave_interval < 1)
+ minsave_interval = 1;
} else if (strcmpi(w1, "save_settings") == 0) {
save_settings = atoi(w2);
} else if (strcmpi(w1, "motd_txt") == 0) {