[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth ./changelog src/ai_attack.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth ./changelog src/ai_attack.cpp |
Date: |
Sat, 13 Nov 2004 17:14:13 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 04/11/13 22:07:44
Modified files:
. : changelog
Log message:
updated changelog
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/changelog.diff?tr1=1.354&tr2=1.355&r1=text&r2=text
Modified files:
src : ai_attack.cpp
Log message:
fixed divide-by-0 error
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai_attack.cpp.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
Patches:
Index: wesnoth/changelog
diff -u wesnoth/changelog:1.379 wesnoth/changelog:1.380
--- wesnoth/changelog:1.379 Thu Nov 11 12:06:59 2004
+++ wesnoth/changelog Thu Nov 11 21:29:13 2004
@@ -28,6 +28,7 @@
* updated translations:
* french
* german
+ * hungarian
* italian
* portuguese
* slovak
Index: wesnoth/src/ai_attack.cpp
diff -u wesnoth/src/ai_attack.cpp:1.51 wesnoth/src/ai_attack.cpp:1.52
--- wesnoth/src/ai_attack.cpp:1.51 Sun Sep 19 20:52:17 2004
+++ wesnoth/src/ai_attack.cpp Sat Nov 13 22:07:40 2004
@@ -1,4 +1,4 @@
-/* $Id: ai_attack.cpp,v 1.51 2004/09/19 20:52:17 Sirp Exp $ */
+/* $Id: ai_attack.cpp,v 1.52 2004/11/13 22:07:40 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -559,7 +559,7 @@
const double exposure_mod = uses_leader ? 2.0 :
ai_obj.current_team().caution();
const double exposure =
exposure_mod*resources_used*(terrain_quality -
alternative_terrain_quality)*vulnerability/maximum<double>(0.01,support);
LOG_AI << "attack option has base value " << value << " with
exposure " << exposure << ": "
- << vulnerability << "/" << support << " = " <<
(vulnerability/support) << "\n";
+ << vulnerability << "/" << support << " = " <<
(vulnerability/maximum<double>(support,0.1)) << "\n";
if(uses_leader) {
ai_obj.log_message("attack option has value " +
str_cast(value) + " with exposure " + str_cast(exposure) + ": " +
str_cast(vulnerability) + "/" + str_cast(support));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth ./changelog src/ai_attack.cpp,
David White <=