src/network/network_server.cpp
branchgamebalance
changeset 9911 0b8b245a2391
parent 9895 7bd07f43b0e3
child 9912 1ac8aac92385
equal deleted inserted replaced
9910:0b2aebc8283e 9911:0b8b245a2391
    99 		p->Send_uint64(_network_player_info[player->index].money);
    99 		p->Send_uint64(_network_player_info[player->index].money);
   100 		p->Send_uint64(_network_player_info[player->index].income);
   100 		p->Send_uint64(_network_player_info[player->index].income);
   101 		p->Send_uint16(_network_player_info[player->index].performance);
   101 		p->Send_uint16(_network_player_info[player->index].performance);
   102 
   102 
   103 		/* Send 1 if there is a passord for the company else send 0 */
   103 		/* Send 1 if there is a passord for the company else send 0 */
   104 		p->Send_bool(StrEmpty(_network_player_info[player->index].password));
   104 		p->Send_bool(!StrEmpty(_network_player_info[player->index].password));
   105 
   105 
   106 		for (i = 0; i < NETWORK_VEHICLE_TYPES; i++) {
   106 		for (i = 0; i < NETWORK_VEHICLE_TYPES; i++) {
   107 			p->Send_uint16(_network_player_info[player->index].num_vehicle[i]);
   107 			p->Send_uint16(_network_player_info[player->index].num_vehicle[i]);
   108 		}
   108 		}
   109 
   109 
  1113 
  1113 
  1114 DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
  1114 DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
  1115 {
  1115 {
  1116 	NetworkAction action = (NetworkAction)p->Recv_uint8();
  1116 	NetworkAction action = (NetworkAction)p->Recv_uint8();
  1117 	DestType desttype = (DestType)p->Recv_uint8();
  1117 	DestType desttype = (DestType)p->Recv_uint8();
  1118 	int dest = p->Recv_uint8();
  1118 	int dest = p->Recv_uint16();
  1119 	char msg[MAX_TEXT_MSG_LEN];
  1119 	char msg[MAX_TEXT_MSG_LEN];
  1120 
  1120 
  1121 	p->Recv_string(msg, MAX_TEXT_MSG_LEN);
  1121 	p->Recv_string(msg, MAX_TEXT_MSG_LEN);
  1122 
  1122 
  1123 	NetworkServer_HandleChat(action, desttype, dest, msg, cs->index);
  1123 	NetworkServer_HandleChat(action, desttype, dest, msg, cs->index);
  1299 
  1299 
  1300 			case VEH_SHIP:
  1300 			case VEH_SHIP:
  1301 				_network_player_info[v->owner].num_vehicle[4]++;
  1301 				_network_player_info[v->owner].num_vehicle[4]++;
  1302 				break;
  1302 				break;
  1303 
  1303 
  1304 			case VEH_SPECIAL:
  1304 			default: break;
  1305 			case VEH_DISASTER:
       
  1306 				break;
       
  1307 		}
  1305 		}
  1308 	}
  1306 	}
  1309 
  1307 
  1310 	// Go through all stations and count the types of stations
  1308 	// Go through all stations and count the types of stations
  1311 	FOR_ALL_STATIONS(s) {
  1309 	FOR_ALL_STATIONS(s) {