[Freeciv-Dev] Re: (PR#6732) CMA display in city report
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Nov 07, 2003 at 02:07:11AM -0800, Christian Knoke wrote:
> On Fri, Nov 07, 2003 at 01:55:47AM -0800, Christian Knoke wrote:
> > On Fri, Nov 07, 2003 at 01:36:11AM -0800, Raimar Falke wrote:
> >
> > > Can you rename your .civclientrc and retry it with new presets. This
> > > is just a guess.
> >
> > Good guess. Works then.
> >
> > My former .civclientrc attached. Find out what's wrong.
>
> Bad guess. Saving the newly generated civclientrc, and restarting client and
> server, reproduces the same buggy behavior.
Odd.
Please apply the patch and mail the output.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Windows is the one true OS. MS invented the GUI. MS invented
the 32 bit OS. MS is open and standard. MS loves you. We have
always been at war with Oceana."
Index: client/agents/cma_fec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_fec.c,v
retrieving revision 1.16
diff -u -u -r1.16 cma_fec.c
--- client/agents/cma_fec.c 2003/09/20 19:24:54 1.16
+++ client/agents/cma_fec.c 2003/11/07 10:43:09
@@ -207,12 +207,16 @@
{
int i;
+ freelog(LOG_NORMAL,"HIGH: get_index_of_parameter(%p)",parameter);
+
for (i = 0; i < preset_list_size(&preset_list); i++) {
struct cma_preset *ppreset = preset_list_get(&preset_list, i);
if (cm_are_parameter_equal(&ppreset->parameter, parameter)) {
+ freelog(LOG_NORMAL,"HIGH: is %s (%p)",ppreset->descr,ppreset);
return i;
}
}
+ freelog(LOG_NORMAL,"HIGH: not found");
return -1;
}
Index: common/aicore/cm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/cm.c,v
retrieving revision 1.14
diff -u -u -r1.14 cm.c
--- common/aicore/cm.c 2003/11/06 10:40:46 1.14
+++ common/aicore/cm.c 2003/11/07 10:43:10
@@ -370,6 +370,24 @@
}
/****************************************************************************
+...
+*****************************************************************************/
+static void print_parameter(const struct cm_parameter *const p)
+{
+ int i;
+ freelog(LOG_NORMAL, "LOW: print_parameter(%p)", p);
+ freelog(LOG_NORMAL, "LOW: require_happy=%d", p->require_happy);
+ freelog(LOG_NORMAL, "LOW: allow_disorder=%d", p->allow_disorder);
+ freelog(LOG_NORMAL, "LOW: factor_target=%d", p->factor_target);
+ freelog(LOG_NORMAL, "LOW: happy_factor=%d", p->happy_factor);
+
+ for (i = 0; i < NUM_STATS; i++) {
+ freelog(LOG_NORMAL, "LOW: [%d] %s: minimal_surplus=%d factor=%d",
+ i, cm_get_stat_name(i), p->minimal_surplus[i], p->factor[i]);
+ }
+}
+
+/****************************************************************************
Print the given result via freelog(LOG_NORMAL,...). The given result
has to be a result for the given city.
*****************************************************************************/
@@ -1530,29 +1548,36 @@
const struct cm_parameter *const p2)
{
int i;
+ bool result=FALSE;
+
+ freelog(LOG_NORMAL,"LOW: cm_are_parameter_equal");
+ print_parameter(p1);
+ print_parameter(p2);
for (i = 0; i < NUM_STATS; i++) {
if (p1->minimal_surplus[i] != p2->minimal_surplus[i]) {
- return FALSE;
+ goto no;
}
if (p1->factor[i] != p2->factor[i]) {
- return FALSE;
+ goto no;
}
}
if (p1->require_happy != p2->require_happy) {
- return FALSE;
+ goto no;
}
if (p1->allow_disorder != p2->allow_disorder) {
- return FALSE;
+ goto no;
}
if (p1->factor_target != p2->factor_target) {
- return FALSE;
+ goto no;
}
if (p1->happy_factor != p2->happy_factor) {
- return FALSE;
+ goto no;
}
-
- return TRUE;
+ result=TRUE;
+ no:
+ freelog(LOG_NORMAL,"LOW: result=%d",result);
+ return result;
}
/**************************************************************************
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, rt, 2003/11/06
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/06
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/06
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Raimar Falke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report,
Raimar Falke <=
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Raimar Falke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Raimar Falke, 2003/11/07
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Christian Knoke, 2003/11/10
- [Freeciv-Dev] Re: (PR#6732) CMA display in city report, Raimar Falke, 2003/11/10
|
|