Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9803) PATCH rm map.grasssize parameter
Home

[Freeciv-Dev] (PR#9803) PATCH rm map.grasssize parameter

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#9803) PATCH rm map.grasssize parameter
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Wed, 25 Aug 2004 00:37:10 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9803 >

> [mburda - Wed Aug 25 06:51:13 2004]:
> 
> Not used and useless parameter deleted
> 
> Marcelo
> 
   int polar = 5; /* FIXME: convert to a server option */
 
-  total = map.mountains + map.deserts + map.forestsize + map.swampsize 
-    + map.grasssize;
+  total = map.mountains + map.deserts + map.forestsize + map.swampsize;

Are you sure that it doesn't change the behavior ?
Maybe map.grassize really means "the rest".

 
-  if (total != 100 - polar) {
+  if (total > 100 - polar) {
Is it correct ? 

     map.forestsize = map.forestsize * (100 - polar) / total;
     map.swampsize = map.swampsize * (100 - polar) / total;
     map.mountains = map.mountains * (100 - polar) / total;
     map.deserts = map.deserts * (100 - polar) / total;
-    map.grasssize = 100 - map.forestsize - map.swampsize - map.mountains 
-      - polar - map.deserts;
  OK
   }
 }
--
mateusz


[Prev in Thread] Current Thread [Next in Thread]