network_server.c
changeset 668 1fe298df8526
parent 667 c6484d63bbe4
child 686 719f01ca0175
equal deleted inserted replaced
667:c6484d63bbe4 668:1fe298df8526
     3 
     3 
     4 #ifdef ENABLE_NETWORK
     4 #ifdef ENABLE_NETWORK
     5 
     5 
     6 #include "table/strings.h"
     6 #include "table/strings.h"
     7 #include "network_server.h"
     7 #include "network_server.h"
       
     8 #include "network_udp.h"
     8 #include "console.h"
     9 #include "console.h"
     9 #include "command.h"
    10 #include "command.h"
    10 #include "gfx.h"
    11 #include "gfx.h"
    11 #include "vehicle.h"
    12 #include "vehicle.h"
    12 #include "station.h"
    13 #include "station.h"
  1196 
  1197 
  1197 		ci = DEREF_CLIENT_INFO(cs);
  1198 		ci = DEREF_CLIENT_INFO(cs);
  1198 		if (ci != NULL && ci->client_playas > 0 && ci->client_playas <= MAX_PLAYERS) {
  1199 		if (ci != NULL && ci->client_playas > 0 && ci->client_playas <= MAX_PLAYERS) {
  1199 			if (strlen(_network_player_info[ci->client_playas-1].players) != 0)
  1200 			if (strlen(_network_player_info[ci->client_playas-1].players) != 0)
  1200 				strncat(_network_player_info[ci->client_playas-1].players, ", ", sizeof(_network_player_info[ci->client_playas-1].players));
  1201 				strncat(_network_player_info[ci->client_playas-1].players, ", ", sizeof(_network_player_info[ci->client_playas-1].players));
  1201 				
  1202 
  1202 			strncat(_network_player_info[ci->client_playas-1].players, client_name, sizeof(_network_player_info[ci->client_playas-1].players));
  1203 			strncat(_network_player_info[ci->client_playas-1].players, client_name, sizeof(_network_player_info[ci->client_playas-1].players));
  1203 		}
  1204 		}
  1204 	}
  1205 	}
  1205 }
  1206 }
  1206 
  1207 
  1370 	// Update the last_sync_frame if needed!
  1371 	// Update the last_sync_frame if needed!
  1371 	if (last_sync_frame + _network_sync_freq < _frame_counter) {
  1372 	if (last_sync_frame + _network_sync_freq < _frame_counter) {
  1372 		last_sync_frame = _frame_counter;
  1373 		last_sync_frame = _frame_counter;
  1373 	}
  1374 	}
  1374 #endif
  1375 #endif
       
  1376 
       
  1377 	/* See if we need to advertise */
       
  1378 	NetworkUDPAdvertise();
  1375 }
  1379 }
  1376 
  1380 
  1377 #endif /* ENABLE_NETWORK */
  1381 #endif /* ENABLE_NETWORK */