Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] goto_is_sane() is insane (PR#2133)
Home

[Freeciv-Dev] goto_is_sane() is insane (PR#2133)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] goto_is_sane() is insane (PR#2133)
From: Sylvain Tricot <sylvaintricot@xxxxxxx>
Date: Fri, 4 Oct 2002 19:08:24 -0700 (PDT)

goto_is_sane() is insane in /freeciv-1.13.0/server/gotohand.c :

in function: goto_is_sane()
1213:
      if (ground_unit_transporter_capacity(x, y, pplayer) > 0) {
        adjc_iterate(punit->x, punit->y, tmp_x, tmp_y) {
          if (map_get_continent(tmp_x, tmp_y) == map_get_continent(x, y))
            possible++;
        } adjc_iterate_end;
      }

was same in /freeciv-1.10.0 :
      if (is_transporter_with_free_space(pplayer, x, y)) {
        for (k = 0; k < 8; k++) {
          if (map_get_continent(punit->x, punit->y) ==
              map_get_continent(x + ii[k], y + jj[k]))
            possible++;
        }
      }

correction:
      if (ground_unit_transporter_capacity(x, y, pplayer) > 0) {
        adjc_iterate(x, y, tmp_x, tmp_y) {
          if (map_get_continent(tmp_x, tmp_y) == map_get_continent(punit->x, 
punit->y))
            possible++;
        } adjc_iterate_end;
      }



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] goto_is_sane() is insane (PR#2133), Sylvain Tricot <=