Ver código fonte

Fixed day and night settings not ignored even if they are set to 0

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1252 54d463be-8e91-2dee-dedb-b68131a5f0ec
celest 20 anos atrás
pai
commit
62c1f710d5
2 arquivos alterados com 6 adições e 2 exclusões
  1. 4 0
      Changelog-SVN.txt
  2. 2 2
      src/map/battle.c

+ 4 - 0
Changelog-SVN.txt

@@ -1,5 +1,9 @@
 Date	Added
 
+03/19
+        * Fixed day and night settings not ignored even if they are set to 0,
+          my bad ^^; [celest]
+
 03/18
         * Fixed a crash when freeing memory of pets [celest]
         * Added Cygwin support to the -DDUMPSTACK option, and changed its format

+ 2 - 2
src/map/battle.c

@@ -4478,9 +4478,9 @@ void battle_validate_conf() {
 		battle_config.night_at_start = 0;
 	else if (battle_config.night_at_start > 1) // added by [Yor]
 		battle_config.night_at_start = 1;
-	if (battle_config.day_duration < 60000) // added by [Yor]
+	if (battle_config.day_duration != 0 && battle_config.day_duration < 60000) // added by [Yor]
 		battle_config.day_duration = 60000;
-	if (battle_config.night_duration < 60000) // added by [Yor]
+	if (battle_config.night_duration != 0 && battle_config.night_duration < 60000) // added by [Yor]
 		battle_config.night_duration = 60000;
 	
 	if (battle_config.ban_spoof_namer < 0) // added by [Yor]