network_server.c
changeset 2200 59c49085dff2
parent 2186 461a2aff3486
child 2204 49bbde7640dd
equal deleted inserted replaced
2199:fda910149e15 2200:59c49085dff2
  1324 		NetworkGetClientName(client_name, sizeof(client_name), cs);
  1324 		NetworkGetClientName(client_name, sizeof(client_name), cs);
  1325 
  1325 
  1326 		ci = DEREF_CLIENT_INFO(cs);
  1326 		ci = DEREF_CLIENT_INFO(cs);
  1327 		if (ci != NULL && ci->client_playas > 0 && ci->client_playas <= MAX_PLAYERS) {
  1327 		if (ci != NULL && ci->client_playas > 0 && ci->client_playas <= MAX_PLAYERS) {
  1328 			if (strlen(_network_player_info[ci->client_playas-1].players) != 0)
  1328 			if (strlen(_network_player_info[ci->client_playas-1].players) != 0)
  1329 				strncat(_network_player_info[ci->client_playas-1].players, ", ", sizeof(_network_player_info[ci->client_playas-1].players));
  1329 				ttd_strlcat(_network_player_info[ci->client_playas - 1].players, ", ", lengthof(_network_player_info[ci->client_playas - 1].players));
  1330 
  1330 
  1331 			strncat(_network_player_info[ci->client_playas-1].players, client_name, sizeof(_network_player_info[ci->client_playas-1].players));
  1331 			ttd_strlcat(_network_player_info[ci->client_playas - 1].players, client_name, lengthof(_network_player_info[ci->client_playas - 1].players));
  1332 		}
  1332 		}
  1333 	}
  1333 	}
  1334 }
  1334 }
  1335 
  1335 
  1336 // Send a packet to all clients with updated info about this client_index
  1336 // Send a packet to all clients with updated info about this client_index