forked from 0ad/0ad
Fix few style issues remarked by leper.
Add a unit (seconds) to the network-timeout warning. Rename isChatAddressee to parseChatAddressee as it changes the message. Early return for EnableOOSLog to avoid printing duplicate messages. This was SVN commit r17895.
This commit is contained in:
parent
a2ecee4168
commit
d61e315f4d
@ -14,12 +14,12 @@ var g_NetworkWarnings = {};
|
||||
var g_NetworkWarningTexts = {
|
||||
|
||||
"server-timeout": (msg, username) =>
|
||||
sprintf(translate("Losing connection to server (%(seconds)s)"), {
|
||||
sprintf(translate("Losing connection to server (%(seconds)ss)"), {
|
||||
"seconds": Math.ceil(msg.lastReceivedTime / 1000)
|
||||
}),
|
||||
|
||||
"client-timeout": (msg, username) =>
|
||||
sprintf(translate("%(player)s losing connection (%(seconds)s)"), {
|
||||
sprintf(translate("%(player)s losing connection (%(seconds)ss)"), {
|
||||
"player": username,
|
||||
"seconds": Math.ceil(msg.lastReceivedTime / 1000)
|
||||
}),
|
||||
|
@ -226,6 +226,7 @@ function setTeamChat(teamChat = false)
|
||||
let chatAddressee = Engine.GetGUIObjectByName("chatAddressee");
|
||||
chatAddressee.selected = chatAddressee.list_data.indexOf(command);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens chat-window or closes it and sends the userinput.
|
||||
*/
|
||||
|
@ -717,7 +717,7 @@ function formatChatCommand(msg)
|
||||
return "";
|
||||
|
||||
let isMe = msg.text.indexOf("/me ") == 0;
|
||||
if (!isMe && !isChatAddressee(msg))
|
||||
if (!isMe && !parseChatAddressee(msg))
|
||||
return "";
|
||||
|
||||
isMe = msg.text.indexOf("/me ") == 0;
|
||||
@ -758,7 +758,7 @@ function formatChatCommand(msg)
|
||||
*
|
||||
* @param {Object} msg
|
||||
*/
|
||||
function isChatAddressee(msg)
|
||||
function parseChatAddressee(msg)
|
||||
{
|
||||
if (msg.text[0] != '/')
|
||||
return true;
|
||||
|
@ -639,7 +639,7 @@ bool CNetClient::OnJoinSyncEndCommandBatch(void* context, CFsmEvent* event)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CNetClient::OnRejoined(void *context, CFsmEvent* event)
|
||||
bool CNetClient::OnRejoined(void* context, CFsmEvent* event)
|
||||
{
|
||||
ENSURE(event->GetType() == (uint)NMT_REJOINED);
|
||||
|
||||
|
@ -586,6 +586,9 @@ CSimulation2::~CSimulation2()
|
||||
|
||||
void CSimulation2::EnableOOSLog()
|
||||
{
|
||||
if (m->m_EnableOOSLog)
|
||||
return;
|
||||
|
||||
m->m_EnableOOSLog = true;
|
||||
debug_printf("Writing ooslogs to %s\n", m->m_OOSLogPath.string8().c_str());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user