Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2005:
[Freeciv-Dev] (PR#12317) one more warming fix
Home

[Freeciv-Dev] (PR#12317) one more warming fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12317) one more warming fix
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Feb 2005 11:28:51 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12317 >

This patch makes global warming truly independent of map size.

This is probably good for large maps but may be a bit rough on smaller maps.

-jason

Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.227
diff -u -r1.227 srv_main.c
--- server/srv_main.c   16 Feb 2005 18:06:29 -0000      1.227
+++ server/srv_main.c   21 Feb 2005 19:26:00 -0000
@@ -386,7 +386,7 @@
     *accum = 0;
   } else {
     *accum -= *level;
-    if (myrand(200) <= *accum) {
+    if (myrand((map_num_tiles() + 19) / 20) <= *accum) {
       upset_action_fn((map.xsize / 10) + (map.ysize / 10) + ((*accum) * 5));
       *accum = 0;
       *level += (map_num_tiles() + 999) / 1000;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12317) one more warming fix, Jason Short <=