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

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

[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#2147)
From: STyx <sylvaintricot@xxxxxxx>
Date: Mon, 7 Oct 2002 13:49:40 -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 sane 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#2147), STyx <=