Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#13043) trade calculation wrong?
Home

[Freeciv-Dev] (PR#13043) trade calculation wrong?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13043) trade calculation wrong?
From: "Brett Albertson" <brett.albertson@xxxxxxxxxxxx>
Date: Thu, 12 May 2005 13:51:29 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13043 >

ok, I modified the code the following code in effect.c:

static bool is_effect_enabled(const struct player *target_player,
                              const struct city *target_city,
                              const struct impr_type *target_building,
                              const struct tile *target_tile,
                              const struct unit *target_unit,
                              const struct output_type *target_output,
                              const struct specialist *target_specialist,
                              const struct effect *peffect)
{
  requirement_list_iterate(peffect->reqs, preq) {
    if (!is_req_active(target_player, target_city, target_building,
                       target_tile, target_unit, target_output,
                       target_specialist,
                       preq)) {
      printf("FALSE\n");
      return FALSE;
    }
  } requirement_list_iterate_end;
  printf("TRUE\n");
  return TRUE;
}


now, I started a civclient.  Then I started the server with civserver -f
xxxxx.sav.  At first it printed mostly FALSE's scattered with a few
TRUE's.  Once I typed start and the game/GUI initialized, it turned to 
100% TRUE.  For thousands of lines, there isn't a single FALSE.  So,
something is being passed in or initiallized such that is_req_active
always returns TRUE.  Any ideas?
  
-- 
Brett Albertson




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