URL: <http://gna.org/bugs/?18472>
Summary: "onsetbarbs" in pre-2.3 savegames/scenarios is reset to 0 on load Project: Freeciv Submitted by: jtn Submitted on: Mon Aug 8 22:33:38 2011 Category: general Severity: 4 - Important Priority: 5 - Normal Status: Ready For Test Assigned to: jtn Originator Email: Open/Closed: Open Release: 2.3.0 Discussion Lock: Any Operating System: Any Planned Release: 2.3.1,2.4.0 _______________________________________________________ Details: In S2_3's savegame.c is the following check: /* old savegames use the year while newer savegames use the turn. */ game.server.onsetbarbarian = MIN(0, game.server.onsetbarbarian); I think this is trying to patch up savegames which have negative onsetbarbs values like -2000 so that they're not actually illegal. Unfortunately, to achieve this it would need to be MAX, not MIN. This means that any pre-2.3 savegame with a non-zero "onsetbarbs" gets it reset to zero. This is most keenly felt with scenarios, such as the tutorial scenario, where new players are subjected to barbarians right from the start (which is how I found this) -- the defaults (and the tutorial) give players 60 barbarian-free turns. Looks like this came in in bug #17513 (and hence only affects S2_3 and trunk). Quick fix attached. A better fix would try to convert negative values (which must be in years) to the equivalent number of turns. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon Aug 8 22:33:39 2011 Name: S2_3-onsetbarbs.diff Size: 637B By: jtn S2_3 r20077 (probably applies to trunk too) <http://gna.org/bugs/download.php?file_id=13782> _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?18472> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev