Author: mir3x
Date: Sun Feb  5 16:34:00 2017
New Revision: 34962

URL: http://svn.gna.org/viewcvs/freeciv?rev=34962&view=rev
Log:
Fixed rounded down terrain bonus in get_defense_power(const struct unit *punit)

Reported by 'unknown' and Marko Lindqvist <cazfi>

See gna bug #25432


Modified:
    branches/S2_6/common/combat.c

Modified: branches/S2_6/common/combat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/combat.c?rev=34962&r1=34961&r2=34962&view=diff
==============================================================================
--- branches/S2_6/common/combat.c       (original)
+++ branches/S2_6/common/combat.c       Sun Feb  5 16:34:00 2017
@@ -473,8 +473,8 @@
   struct unit_class *pclass = unit_class_get(punit);
 
   if (uclass_has_flag(pclass, UCF_TERRAIN_DEFENSE)) {
-    db = 10 + tile_terrain(ptile)->defense_bonus / 10;
-    power = (power * db) / 10;
+    db = 100 + tile_terrain(ptile)->defense_bonus;
+    power = (power * db) / 100;
   }
 
   if (!is_native_tile_to_class(pclass, ptile)) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to