[Freeciv-Dev] Re: (PR#11111) Server Crash-- Bug in Beta 4
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11111 >
patch attached. normally we don't want to treat the observer as a normal
player unless aifill maxes out the regular players.
We ended up having 31 regular players (including the observer) so the
second barbarian created killed off the game.
-mike
? .civgame-2500.sav.gz.swp
? server/.srv_main.c.swp
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.201.2.6
diff -u -r1.201.2.6 srv_main.c
--- server/srv_main.c 1 Dec 2004 22:14:52 -0000 1.201.2.6
+++ server/srv_main.c 4 Dec 2004 20:52:31 -0000
@@ -1389,13 +1389,17 @@
game.max_players);
}
- /* we don't want aifill to count global observers... */
+ /* we don't want aifill to count global observers unless
+ * aifill = MAX_NUM_PLAYERS */
i = 0;
players_iterate(pplayer) {
if (pplayer->is_observer) {
i++;
}
} players_iterate_end;
+ if (game.aifill == MAX_NUM_PLAYERS) {
+ i = 0;
+ }
for(;game.nplayers < game.aifill + i;) {
nation = select_random_nation(common_class);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#11111) Server Crash-- Bug in Beta 4,
Mike Kaufman <=
|
|