Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8798) remove map.fixed_start_positions
Home

[Freeciv-Dev] (PR#8798) remove map.fixed_start_positions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8798) remove map.fixed_start_positions
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 May 2004 20:16:44 -0700
Reply-to: rt@xxxxxxxxxxx

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

Oops.

The patch I committed had a hideous bug.  Of course num_start_positions
is usually 0 and this isn't an error.  In this case the positions get
generated later.

This patch fixes it.

jason

Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.320
diff -u -r1.320 stdinhand.c
--- server/stdinhand.c  27 May 2004 02:06:52 -0000      1.320
+++ server/stdinhand.c  27 May 2004 02:56:39 -0000
@@ -4508,7 +4508,8 @@
   case PRE_GAME_STATE:
     /* Sanity check scenario */
     if (game.is_new_game && !check) {
-      if (game.max_players > map.num_start_positions) {
+      if (map.num_start_positions > 0
+         && game.max_players > map.num_start_positions) {
        /* If we load a pre-generated map (i.e., a scenario) it is possible
         * to increase the number of players beyond the number supported by
         * the scenario.  The solution is a hack: cut the extra players

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