Follow-up Comment #1, patch #1296 (project freeciv):
It looks a good patch. But I noticed an error in notify_conn_packet(): if
one connection is not allowed to receive the tile coordinates, then the
coordinates in the packets are set to -1 (which is right), but then, if the
next connection of the list is allowed to see that tile, the packet
coordinates are not computed back.
Also, I'm not sure about:
if (packet->x != -1 && packet->y != -1) {
ptile = map_pos_to_tile(packet->x, packet->y);
} else {
assert(!is_normal_map_pos(-1, -1));
ptile = NULL;
}
I would have done:
if (is_normal_map_pos(packet->x, packet->y)) {
ptile = map_pos_to_tile(packet->x, packet->y);
} else {
ptile = NULL;
}
like in client side.
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1296>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev