Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#6279) Add function to pf: pf_get_parameter()
Home

[Freeciv-Dev] (PR#6279) Add function to pf: pf_get_parameter()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6279) Add function to pf: pf_get_parameter()
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 25 Sep 2003 07:58:28 -0700
Reply-to: rt@xxxxxxxxxxxxxx

See $subject. We need this to figure out whether pf maps are still valid
when we no longer have a reference to the old parameter we used to create
the pf map.

  - Per

Index: common/aicore/path_finding.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/path_finding.c,v
retrieving revision 1.13
diff -u -r1.13 path_finding.c
--- common/aicore/path_finding.c        17 Sep 2003 16:59:18 -0000      1.13
+++ common/aicore/path_finding.c        25 Sep 2003 15:47:10 -0000
@@ -1117,3 +1117,11 @@
 
   return NULL;
 }
+
+/************************************************************************
+  Return current pf_parameter for given pf_map.
+************************************************************************/
+struct pf_parameter *pf_get_parameter(struct pf_map *map)
+{
+  return map->params;
+}
Index: common/aicore/path_finding.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/path_finding.h,v
retrieving revision 1.4
diff -u -r1.4 path_finding.h
--- common/aicore/path_finding.h        19 Jul 2003 15:13:54 -0000      1.4
+++ common/aicore/path_finding.h        25 Sep 2003 15:47:10 -0000
@@ -395,4 +395,7 @@
 /* Returns the last position of the given path. */
 struct pf_position *pf_last_position(struct pf_path *path);
 
+/* Return the current parameters for the given map. */
+struct pf_parameter *pf_get_parameter(struct pf_map *map);
+
 #endif

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6279) Add function to pf: pf_get_parameter(), Per I. Mathisen <=