diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-20 15:44:46 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-03-20 15:44:46 +0000 |
commit | 2c850ca9e7195ca46674f5c63b48792c837c5b3a (patch) | |
tree | 98255b5a4de7a1ca27a1f15b865c0ddc1d4b485f /src | |
parent | 257a41619254ceb14b6e0867a20449248b540d41 (diff) | |
download | hercules-2c850ca9e7195ca46674f5c63b48792c837c5b3a.tar.gz hercules-2c850ca9e7195ca46674f5c63b48792c837c5b3a.tar.bz2 hercules-2c850ca9e7195ca46674f5c63b48792c837c5b3a.tar.xz hercules-2c850ca9e7195ca46674f5c63b48792c837c5b3a.zip |
* Don't register the day/night timers if any one is set to 0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1258 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index c681f8ec5..9e607f560 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7262,12 +7262,13 @@ int do_init_pc(void) { pc_read_gm_account(0); #endif /* not TXT_ONLY */ - // add night/day timer (by [yor]) - add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor] - add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor] - { + if (battle_config.day_duration > 0 && battle_config.night_duration > 0) { int day_duration = battle_config.day_duration; int night_duration = battle_config.night_duration; + // add night/day timer (by [yor]) + add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor] + add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor] + if (battle_config.night_at_start == 0) { night_flag = 0; // 0=day, 1=night [Yor] day_timer_tid = add_timer_interval(gettick() + day_duration + night_duration, map_day_timer, 0, 0, day_duration + night_duration); |