Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13155) observers trigger sanity checks
Home

[Freeciv-Dev] (PR#13155) observers trigger sanity checks

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13155) observers trigger sanity checks
From: "Jason Dorje Short" <jdorje@xxxxxxxxx>
Date: Sat, 21 May 2005 12:01:49 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13155 >

Playing any games with observers triggers some sanity checks.  This is
stupid; we don't really care what government a non-living player is in.
 This patch skips the sanity checks.  I will commit immediately.

I don't know what change caused this to trigger.  I imagine observers
used to be initialized to despotism but are no uninitialized (or
initialized directly to anarchy).  This loop has been the same since 2.0
(basically) but 2.0 doesn't have this problem (nonetheless we should
probably patch 2.0 similarly).

-jason

? vgcore.pid30232
? server/foo.c
? server/ste9Suue
Index: server/sanitycheck.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sanitycheck.c,v
retrieving revision 1.64
diff -u -r1.64 sanitycheck.c
--- server/sanitycheck.c        5 May 2005 18:32:53 -0000       1.64
+++ server/sanitycheck.c        21 May 2005 18:58:57 -0000
@@ -403,6 +403,12 @@
   players_iterate(pplayer) {
     int found_palace = 0;
 
+    if (!pplayer->is_alive) {
+      /* Don't do these checks.  Note there are some dead-players
+       * sanity checks below. */
+      continue;
+    }
+
     city_list_iterate(pplayer->cities, pcity) {
       if (is_capital(pcity)) {
        found_palace++;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13155) observers trigger sanity checks, Jason Dorje Short <=