Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4331) Bug in cm.c
Home

[Freeciv-Dev] Re: (PR#4331) Bug in cm.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4331) Bug in cm.c
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Sun, 8 Jun 2003 11:50:07 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, Jun 06, 2003 at 03:13:28PM -0700, Per I. Mathisen wrote:
> 
> On Fri, 6 Jun 2003, Raimar Falke wrote:
> > With cm3.diff and this savegame I this core dump:
> >
> > civserver: timing.c:241: start_timer: Assertion `t != ((void *)0)' failed.
> 
> You need to move the cm_init() and cm_done() calls in server/srv_main.c.
> cm4 fixes this.

I see.

> > With cm4.diff I have problems taking "a".
> >
> > I take
> > take hawk a
> > ai a
> > ai b
> > list
> > and get:
> > List of players:
> > ------------------------------------------------------------------------------
> > a (user hawk, AI, difficulty level hard, nation Latvians) 1 connection:
> > hawk from localhost.localdomain (command access level ctrl), bufsize=40kb
> > b (user Unassigned, Human, nation Swedes)
> > ------------------------------------------------------------------------------
> 
> Weird. This is not a problem of the patch, though, I am sure.
> 
> > If I than start the game it just runs. Without waiting for my
> > turn-done. Weird.
> 
> Did you remember to tick that 'turn done in AI mode' client option? :-)

I have "ai_manual_turn_done=1" which should be the correct mode.

> Anyway, cm4 doesn't trigger the cm bug described in this ticket. It routes
> around the damage. You'll have to add the cm3 change to common/aicore/cm.c
> manually.

From cm3.diff:

+    city_map_iterate(x, y) {
+      if (result->worker_positions_used[x][y]) {
+        assert(pcity->city_map[x][y] == C_TILE_EMPTY
+               || pcity->city_map[x][y] == C_TILE_WORKER);
+      }
+    } city_map_iterate_end;

This is obviously incorrect as it doesn't handle unreal map
position. So use city_map_checked_iterate or my_city_map_iterate
(which leaves out the center). Was this the problem/error?!

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "If at first you don't succeed... well so much for skydiving."




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