Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#5289) danger_construct_path Assert
Home

[Freeciv-Dev] Re: (PR#5289) danger_construct_path Assert

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5289) danger_construct_path Assert
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Sat, 30 Aug 2003 10:55:16 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, 21 Aug 2003, Christian Knoke wrote:

> 
> CVS 21 AUG 2003 GTK 1
> 
> Civclient assert failed at pressing 'G' on trireme with partial MP left.
> 
> Reproducible. Load savegame, login as chris, and start. Press 'G' on active
> trireme south of Hamburg.

The fix is attached.  I must admit that the code is terribly complicated 
around there.  Partly (although not fully), it is due to the random 
movement.

G.


Index: common/aicore/path_finding.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/path_finding.c,v
retrieving revision 1.10
diff -u -r1.10 path_finding.c
--- common/aicore/path_finding.c        2003/07/17 22:33:34     1.10
+++ common/aicore/path_finding.c        2003/08/30 17:52:33
@@ -697,7 +697,7 @@
 }
 
 /***********************************************************************
-  Creating path segment going back to a safe tile.
+  Creating path segment going back from d_node1 to a safe tile.
 ***********************************************************************/
 static void create_danger_segment(struct pf_map *pf_map, enum direction8 dir,
                                   struct danger_node *d_node1, int length)
@@ -887,6 +887,9 @@
             /* We don't consider waiting to get to a safe tile as 
              * "real" waiting */
            d_node1->waited = FALSE;
+            if (pf_map->status[pf_map->index] == NS_WAITING) {
+              d_node1->step--;
+            }
          }
          pf_map->status[index1] = NS_NEW;
          pq_insert(pf_map->queue, index1, -cost_of_path);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#5289) danger_construct_path Assert, Gregory Berkolaiko <=