Changeset - r26371:11508d1cd154
[Not reviewed]
master
0 1 0
dP - 2 years ago 2022-09-12 08:18:41
dp@dpointer.org
Fix: Incorrect player name in online players window (#10013)
1 file changed with 8 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/network/network_gui.cpp
Show inline comments
 
@@ -1777,9 +1777,11 @@ public:
 
				SetDParam(0, STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_UNKNOWN + _network_server_connection_type);
 
				break;
 

	
 
			case WID_CL_CLIENT_NAME:
 
				SetDParamStr(0, _settings_client.network.client_name);
 
			case WID_CL_CLIENT_NAME: {
 
				const NetworkClientInfo *own_ci = NetworkClientInfo::GetByClientID(_network_own_client_id);
 
				SetDParamStr(0, own_ci != nullptr ? own_ci->client_name : _settings_client.network.client_name);
 
				break;
 
			}
 

	
 
			case WID_CL_CLIENT_COMPANY_COUNT:
 
				SetDParam(0, NetworkClientInfo::GetNumItems());
 
@@ -1799,12 +1801,13 @@ public:
 
				ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_CLIENT_LIST_SERVER_NAME_QUERY_CAPTION, NETWORK_NAME_LENGTH, this, CS_ALPHANUMERAL, QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case WID_CL_CLIENT_NAME_EDIT:
 
			case WID_CL_CLIENT_NAME_EDIT: {
 
				const NetworkClientInfo *own_ci = NetworkClientInfo::GetByClientID(_network_own_client_id);
 
				this->query_widget = WID_CL_CLIENT_NAME_EDIT;
 
				SetDParamStr(0, _settings_client.network.client_name);
 
				SetDParamStr(0, own_ci != nullptr ? own_ci->client_name : _settings_client.network.client_name);
 
				ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION, NETWORK_CLIENT_NAME_LENGTH, this, CS_ALPHANUMERAL, QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			}
 
			case WID_CL_SERVER_VISIBILITY:
 
				if (!_network_server) break;
 

	
0 comments (0 inline, 0 general)