[Freeciv-Dev] Re: (PR#10317) Tile marked as worked but occupied by an en
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10317 >
Update:
This can be reproduced with the stable branch using the attached patch
and the attached autogame. Thanks to Mike for making these.
jason
? server/.sanitycheck.c.swp
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.276
diff -u -r1.276 citytools.c
--- server/citytools.c 29 Sep 2004 02:24:23 -0000 1.276
+++ server/citytools.c 13 Oct 2004 03:39:46 -0000
@@ -1242,7 +1242,11 @@
city_reduce_size(pcity, 1);
send_player_info(pplayer, pplayer); /* Update techs */
- if (do_civil_war) {
+
+// if (do_civil_war) {
+ if (city_list_size(&cplayer->cities) >= 4
+ && game.nplayers < game.playable_nation_count
+ && get_num_human_and_ai_players() < MAX_NUM_PLAYERS) {
civil_war(cplayer);
}
}
Index: server/sanitycheck.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sanitycheck.c,v
retrieving revision 1.53
diff -u -r1.53 sanitycheck.c
--- server/sanitycheck.c 4 Oct 2004 05:08:22 -0000 1.53
+++ server/sanitycheck.c 13 Oct 2004 03:39:46 -0000
@@ -203,23 +203,27 @@
freelog(LOG_ERROR, "Tile at %s->%d,%d marked as "
"worked but main map disagrees!",
pcity->name, TILE_XY(ptile));
+ abort();
}
if (is_enemy_unit_tile(ptile, pplayer)) {
freelog(LOG_ERROR, "Tile at %s->%d,%d marked as "
"worked but occupied by an enemy unit!",
pcity->name, TILE_XY(ptile));
+ abort();
}
if (game.borders > 0
&& owner && owner->player_no != pcity->owner) {
freelog(LOG_ERROR, "Tile at %s->%d,%d marked as "
"worked but in enemy territory!",
pcity->name, TILE_XY(ptile));
+ abort();
}
if (!city_can_work_tile(pcity, x, y)) {
/* Complete check. */
freelog(LOG_ERROR, "Tile at %s->%d,%d marked as "
"worked but is unavailable!",
pcity->name, TILE_XY(ptile));
+ abort();
}
break;
case C_TILE_UNAVAILABLE:
set size 4
set gameseed 16 # repeat a particular game (random) sequence
set mapseed 7 # repeat a particular map generation sequence
set gen 2
set landmass 35
set saveturns 1
#set timeout 0 # run a client/server autogame
set timeout -1 # run a server only autogame
set aifill 5 # fill to 7 players
hard # make the AI do complex things
create Caesar # first player (with known name) created and
# toggled to AI mode
set huts 500
#set compress 0
#rulesetdir ../mike
set endyear 1900
set techl 0
set gold 500
set gamelog 40
start
# Note: After the start command the server prompt is unusable in
# autogame mode.
# The commandline to run server-only games can be typed as variations
# of:
# $ while( time server/civserver -r civ.serv ); do date; done
# --- or ---
# $ server/civserver -r civ.serv -f buggy1534.sav.gz
# To attach one or more clients to an autogame, remove the "start"
# command, start the server program and attach clients to created AI
# players. Or type "aitoggle <player>" at the server command prompt for
# each player that connects. Finally, type "start" when you are ready to
# watch the show.
|
|