Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6606) S1_14 coredump
Home

[Freeciv-Dev] Re: (PR#6606) S1_14 coredump

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6606) S1_14 coredump
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 22 Oct 2003 15:22:27 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, 22 Oct 2003, Per I. Mathisen wrote:
> civserver: sanitycheck.c:239: check_units: Assertion
> `ground_unit_transporter_capacity(x, y, pplayer) >= 0' failed.
>
> To reproduce, login as 'perrin', presss 'turn done' twice.

...and backport of fix for this issue from CVS.

  - Per

Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.185.2.2
diff -u -r1.185.2.2 unittools.c
--- server/unittools.c  18 Nov 2002 12:29:56 -0000      1.185.2.2
+++ server/unittools.c  22 Oct 2003 22:21:33 -0000
@@ -2533,28 +2533,6 @@
   int capacity = get_transporter_capacity(ptrans);
   struct tile *ptile = map_get_tile(x, y);
 
-  /*** FIXME: We kludge AI compatability problems with the new code away here 
***/
-  if (is_sailing_unit(ptrans)
-      && is_ground_units_transport(ptrans)
-      && unit_owner(ptrans)->ai.control) {
-    unit_list_iterate(ptile->units, pcargo) {
-      if (pcargo->owner == playerid) {
-       pcargo->transported_by = -1;
-      }
-    } unit_list_iterate_end;
-
-    unit_list_iterate(ptile->units, pcargo) {
-      if ((ptile->terrain == T_OCEAN || pcargo->activity == ACTIVITY_SENTRY)
-         && capacity > 0
-         && is_ground_unit(pcargo)
-         && pcargo->owner == playerid) {
-       pcargo->transported_by = ptrans->id;
-       capacity--;
-      }
-    } unit_list_iterate_end;
-    return;
-  }
-
   /*** Ground units transports first ***/
   if (is_ground_units_transport(ptrans)) {
     int available =

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#6606) S1_14 coredump, Per I. Mathisen <=