En/na Matthias Pfafferodt ha escrit:
The check is implemented like this since 2004 ...Considering patch #2943
(https://gna.org/patch/?2943), the index values should be compared:

bool same_pos(const struct tile *tile1, const struct tile *tile2)
{
   fc_assert_ret_val(tile1 != NULL&&  tile2 != NULL, FALSE);
   return (tile1->index == tile2->index);
}
    But this is not the code on S2_3 and trunk!! It's that:

bool same_pos(const struct tile *tile1, const struct tile *tile2)
{
  fc_assert_ret_val(tile1 != NULL && tile2 != NULL, FALSE);
  return (tile1 == tile2);
}

    This is comparing only the pointers!!! Is this correct?


Am Sonntag, 4. September 2011, 02:48:24 schrieb Jordi Negrevernis i Font:
      I was trying to debug some issues with the AI, and i realized that
some checks I put in the code didn't succeed because the 'same_pos'
function does not check the value of x and y in the structure, instead
it just compares the points!!!????!!!

      How is that supposed to work??!! Which is the way to check two
locations?

      Thanks


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to