diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/client/packhand.c workdir/client/packhand.c --- freeciv/client/packhand.c Sun May 28 20:11:20 2000 +++ workdir/client/packhand.c Sun May 28 20:23:34 2000 @@ -719,7 +719,7 @@ pplayer->embassy=pinfo->embassy; pplayer->city_style=pinfo->city_style; - for (i = 0; i < MAX_NUM_PLAYERS; i++) { + for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { pplayer->diplstates[i].type = pinfo->diplstates[i].type; pplayer->diplstates[i].turns_left = diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/game.c workdir/common/game.c --- freeciv/common/game.c Sun May 28 20:52:48 2000 +++ workdir/common/game.c Sun May 28 20:49:37 2000 @@ -933,15 +933,15 @@ for (i=0; idiplstates[j] = pplayer->diplstates[j+1]; } - pplayer->diplstates[game.nplayers-1].type = DS_NEUTRAL; - pplayer->diplstates[game.nplayers-1].has_reason_to_cancel = 0; + pplayer->diplstates[game.nplayers].type = DS_NEUTRAL; + pplayer->diplstates[game.nplayers].has_reason_to_cancel = 0; } - - for(i=0; iis_alive?1:0); cptr=put_uint32(cptr, pinfo->reputation); - for (i = 0; i < MAX_NUM_PLAYERS; i++) { + for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { cptr=put_uint32(cptr, pinfo->diplstates[i].type); cptr=put_uint32(cptr, pinfo->diplstates[i].turns_left); cptr=put_uint32(cptr, pinfo->diplstates[i].has_reason_to_cancel); @@ -1614,7 +1614,7 @@ iget_uint8(&iter, &pinfo->is_alive); iget_uint32(&iter, &pinfo->reputation); - for (i = 0; i < MAX_NUM_PLAYERS; i++) { + for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { iget_uint32(&iter, (int*)&pinfo->diplstates[i].type); iget_uint32(&iter, &pinfo->diplstates[i].turns_left); iget_uint32(&iter, &pinfo->diplstates[i].has_reason_to_cancel); diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/packets.h workdir/common/packets.h --- freeciv/common/packets.h Sun May 28 20:11:40 2000 +++ workdir/common/packets.h Sun May 28 20:25:28 2000 @@ -411,7 +411,7 @@ int turn_done, nturns_idle; int is_alive; int reputation; - struct player_diplstate diplstates[MAX_NUM_PLAYERS]; + struct player_diplstate diplstates[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS]; int gold, tax, science, luxury; int researched; int researchpoints; diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/player.c workdir/common/player.c --- freeciv/common/player.c Sun May 28 20:11:40 2000 +++ workdir/common/player.c Sun May 28 20:25:58 2000 @@ -76,7 +76,7 @@ plr->is_alive=1; plr->embassy=0; plr->reputation=GAME_DEFAULT_REPUTATION; - for(i = 0; i < MAX_NUM_PLAYERS; i++) { + for(i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { plr->diplstates[i].type = DS_NEUTRAL; plr->diplstates[i].has_reason_to_cancel = 0; } diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/player.h workdir/common/player.h --- freeciv/common/player.h Sun May 28 20:11:40 2000 +++ workdir/common/player.h Sun May 28 20:26:24 2000 @@ -156,7 +156,7 @@ int capital; /* bool used to give player capital in first city. */ int embassy; int reputation; - struct player_diplstate diplstates[MAX_NUM_PLAYERS]; + struct player_diplstate diplstates[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS]; int city_style; struct unit_list units; struct city_list cities; diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/common/shared.h workdir/common/shared.h --- freeciv/common/shared.h Sun May 28 20:11:40 2000 +++ workdir/common/shared.h Sun May 28 20:31:35 2000 @@ -26,6 +26,7 @@ #define BROADCAST_EVENT -2 #define MAX_NUM_PLAYERS 30 +#define MAX_NUM_BARBARIANS 2 #define MAX_NUM_ITEMS 200 /* eg, unit_types */ #define MAX_NUM_TECH_LIST 10 #define MAX_LEN_NAME 32 diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/server/barbarian.c workdir/server/barbarian.c --- freeciv/server/barbarian.c Sun May 28 20:11:48 2000 +++ workdir/server/barbarian.c Sun May 28 20:50:48 2000 @@ -151,6 +151,11 @@ barbarians->government = game.government_when_anarchy; barbarians->capital = 0; barbarians->economic.gold = 100; + for(i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { + barbarians->diplstates[i].type = DS_NEUTRAL; + barbarians->diplstates[i].has_reason_to_cancel = 0; + } + barbarians->embassy = 0; barbarians->turn_done = 1; diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/server/citytools.c workdir/server/citytools.c --- freeciv/server/citytools.c Sun May 28 20:11:48 2000 +++ workdir/server/citytools.c Sun May 28 20:49:16 2000 @@ -759,6 +759,10 @@ cplayer->government = game.government_when_anarchy; pplayer->revolution = 1; cplayer->capital = 1; + for(i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) { + cplayer->diplstates[i].type = DS_NEUTRAL; + cplayer->diplstates[i].has_reason_to_cancel = 0; + } /* Split the resources */ diff -Nur -X/home/thue/freeciv-dev/freeciv/diff_ignore freeciv/server/plrhand.c workdir/server/plrhand.c --- freeciv/server/plrhand.c Sun May 28 20:11:48 2000 +++ workdir/server/plrhand.c Sun May 28 20:28:15 2000 @@ -2046,7 +2046,7 @@ info.city_style=game.players[i].city_style; info.reputation=game.players[i].reputation; - for(j=0; jreputation=secfile_lookup_int_default(file, GAME_DEFAULT_REPUTATION, "player%d.reputation", plrno); - for(i=0; idiplstates[i].type = secfile_lookup_int_default(file, DS_NEUTRAL, "player%d.diplstate%d.type", plrno, i); @@ -2684,7 +2684,7 @@ secfile_insert_str(file, invs, "player%d.invs", plrno); secfile_insert_int(file, plr->reputation, "player%d.reputation", plrno); - for (i = 0; i < MAX_NUM_PLAYERS; i++) { + for (i = 0; i < MAX_NUM_PLAYERS+MAX_NUM_BARBARIANS; i++) { secfile_insert_int(file, plr->diplstates[i].type, "player%d.diplstate%d.type", plrno, i); secfile_insert_int(file, plr->diplstates[i].turns_left,