src/command.cpp
changeset 10225 eb61dd8101c1
parent 10208 72c00af5c95d
child 10237 c55922dabb25
equal deleted inserted replaced
10224:422d31f4559f 10225:eb61dd8101c1
   588 	 * the other parties won't be able to execute our command and will desync.
   588 	 * the other parties won't be able to execute our command and will desync.
   589 	 * We also need to do this if the server's company has gone bankrupt
   589 	 * We also need to do this if the server's company has gone bankrupt
   590 	 * @todo Rewrite (dedicated) server to something more than a dirty hack!
   590 	 * @todo Rewrite (dedicated) server to something more than a dirty hack!
   591 	 */
   591 	 */
   592 	if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
   592 	if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
   593 		CompanyID pbck = _local_company;
   593 		CompanyID bck = _local_company;
   594 		if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
   594 		if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
   595 		NetworkSend_Command(tile, p1, p2, cmd, callback);
   595 		NetworkSend_Command(tile, p1, p2, cmd, callback);
   596 		if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = pbck;
   596 		if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = bck;
   597 		_docommand_recursive = 0;
   597 		_docommand_recursive = 0;
   598 		_cmd_text = NULL;
   598 		_cmd_text = NULL;
   599 		ClearStorageChanges(false);
   599 		ClearStorageChanges(false);
   600 		return true;
   600 		return true;
   601 	}
   601 	}