openttd updated to 1.5.0-beta2
--HG-- branch : openttd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: network_client.cpp 24900 2013-01-08 22:46:42Z planetmaker $ */
|
||||
/* $Id: network_client.cpp 27020 2014-10-15 18:31:37Z rubidium $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/* This file handles all the client-commands */
|
||||
|
||||
|
||||
@@ -208,7 +210,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res)
|
||||
* when that's the case handle it appropriately.
|
||||
* @return true when everything went okay.
|
||||
*/
|
||||
/*static */ bool ClientNetworkGameSocketHandler::Receive()
|
||||
/* static */ bool ClientNetworkGameSocketHandler::Receive()
|
||||
{
|
||||
if (my_client->CanSendReceive()) {
|
||||
NetworkRecvStatus res = my_client->ReceivePackets();
|
||||
@@ -223,7 +225,7 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res)
|
||||
}
|
||||
|
||||
/** Send the packets of this socket handler. */
|
||||
/*static */ void ClientNetworkGameSocketHandler::Send()
|
||||
/* static */ void ClientNetworkGameSocketHandler::Send()
|
||||
{
|
||||
my_client->SendPackets();
|
||||
my_client->CheckConnection();
|
||||
@@ -956,7 +958,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(Packet *p)
|
||||
switch (action) {
|
||||
case NETWORK_ACTION_CHAT_CLIENT:
|
||||
/* For speaking to client we need the client-name */
|
||||
snprintf(name, sizeof(name), "%s", ci_to->client_name);
|
||||
seprintf(name, lastof(name), "%s", ci_to->client_name);
|
||||
ci = NetworkClientInfo::GetByClientID(_network_own_client_id);
|
||||
break;
|
||||
|
||||
@@ -977,7 +979,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(Packet *p)
|
||||
}
|
||||
} else {
|
||||
/* Display message from somebody else */
|
||||
snprintf(name, sizeof(name), "%s", ci_to->client_name);
|
||||
seprintf(name, lastof(name), "%s", ci_to->client_name);
|
||||
ci = ci_to;
|
||||
}
|
||||
|
||||
@@ -1229,7 +1231,7 @@ void NetworkUpdateClientName()
|
||||
if (!_network_server) {
|
||||
MyClient::SendSetName(_settings_client.network.client_name);
|
||||
} else {
|
||||
if (NetworkFindName(_settings_client.network.client_name)) {
|
||||
if (NetworkFindName(_settings_client.network.client_name, lastof(_settings_client.network.client_name))) {
|
||||
NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, CC_DEFAULT, false, ci->client_name, _settings_client.network.client_name);
|
||||
strecpy(ci->client_name, _settings_client.network.client_name, lastof(ci->client_name));
|
||||
NetworkUpdateClientInfo(CLIENT_ID_SERVER);
|
||||
|
||||
Reference in New Issue
Block a user