summaryrefslogtreecommitdiff
path: root/src/map/pc.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/pc.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/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 59d65aa0d..cb03378e3 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7175,12 +7175,9 @@ int pc_autosave(int tid,unsigned int tick,int id,int data)
save_flag = 1; //Noone was saved, so save first found char.
map_foreachpc(pc_autosave_sub);
- if (autosave_interval < 0)
- return 0; //Fixed interval for saving. [Skotlex]
-
interval = autosave_interval/(clif_countusers()+1);
- if(interval <= 0)
- interval = 1;
+ if(interval < minsave_interval)
+ interval = minsave_interval;
add_timer(gettick()+interval,pc_autosave,0,0);
return 0;
@@ -7594,10 +7591,7 @@ int do_init_pc(void) {
natural_heal_prev_tick = gettick();
add_timer_interval(natural_heal_prev_tick + NATURAL_HEAL_INTERVAL, pc_natural_heal, 0, 0, NATURAL_HEAL_INTERVAL);
- if (autosave_interval > 0) //Normal saving.
- add_timer(gettick() + autosave_interval, pc_autosave, 0, 0);
- else //Constant save interval.
- add_timer_interval(gettick() -autosave_interval, pc_autosave, 0, 0, -autosave_interval);
+ add_timer(gettick() + autosave_interval, pc_autosave, 0, 0);
if (battle_config.day_duration > 0 && battle_config.night_duration > 0) {
int day_duration = battle_config.day_duration;