URL:
  <http://gna.org/bugs/?24389>

                 Summary: Climate moderation at coasts not working as intended
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Sat 06 Feb 2016 10:44:27 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 

    _______________________________________________________

Details:

In create_tmap there's code intended to make ocean proximity moderate climate
extremes:


   /* near ocean temperature can be 15% more "temperate" */
   float temperate = (0.15 * (game.map.server.temperature / 100 - t
                              / MAX_COLATITUDE)
                      * 2 * MIN(50, count_terrain_class_near_tile(ptile,
                                                                  FALSE,
                                                                  TRUE,
                                                                  TC_OCEAN))
                      / 100);


However, since the core term


(game.map.server.temperature / 100 - t / MAX_COLATITUDE)


is all in integer arithmetic (all variables are 'int'), I think this can't be
working as designed; the whole term is either 1, 0, or -1:
* For temperature<100, this term has no effect except for perhaps a few tiles
exactly at the equator getting colder
* For temperature==100, tiles near water get warmer everywhere except exactly
at the equator

I think this can never have worked since the code was added in (I think) r8213
<http://svn.gna.org/viewcvs/freeciv?revision=8213&view=revision> in 2004.

I haven't tested this.

I'm looking at making it possible for the map generator to generate sea ice,
so I'd want to think a bit about how to fix this (since it affects the
temperature of water tiles).




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?24389>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to