Author: cazfi
Date: Sun Sep 11 15:01:53 2016
New Revision: 33777

URL: http://svn.gna.org/viewcvs/freeciv?rev=33777&view=rev
Log:
Fixed bug that caused trade route income to be almost one hundred times too big.

See bug #25049

Modified:
    trunk/common/traderoutes.c

Modified: trunk/common/traderoutes.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/traderoutes.c?rev=33777&r1=33776&r2=33777&view=diff
==============================================================================
--- trunk/common/traderoutes.c  (original)
+++ trunk/common/traderoutes.c  Sun Sep 11 15:01:53 2016
@@ -327,8 +327,8 @@
       && NULL != pc2 && NULL != pc2->tile) {
     int real_dist = real_map_distance(pc1->tile, pc2->tile);
     int weighted_distance
-      = (100 - game.info.trade_world_rel_pct) * real_dist
-        + game.info.trade_world_rel_pct * (real_dist * 40 / MAX(wld.map.xsize, 
wld.map.ysize));
+      = ((100 - game.info.trade_world_rel_pct) * real_dist
+         + game.info.trade_world_rel_pct * (real_dist * 40 / 
MAX(wld.map.xsize, wld.map.ysize))) / 100;
 
     bonus = weighted_distance
             + city_size_get(pc1) + city_size_get(pc2);


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

Reply via email to