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

I got a other idea (ugly hack):

/**************************************************************************
  Send PACKET_FREEZE_CLIENT to all clients capable of handling it.
**************************************************************************/
static void freeze_clients(void)
{
  conn_list_iterate(game.game_connections, pconn) {
    if (has_capability("ReportFreezeFix", pconn->capability)) {
      send_packet_freeze_client(pconn);
    }
  } conn_list_iterate_end;
}

/**************************************************************************
  Send PACKET_THAW_CLIENT to all clients capable of handling it.
**************************************************************************/
static void thaw_clients(void)
{
  conn_list_iterate(game.game_connections, pconn) {
    if (has_capability("ReportFreezeFix", pconn->capability)) {
      send_packet_thaw_client(pconn);
    } else {
      /* For old client udpates */
      send_packet_freeze_hint(pconn);
      send_packet_thaw_hint(pconn);
    }
  } conn_list_iterate_end;
}

Then old clients should be updated and packet buffering should work well.


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

Reply via email to