Update to 1.10.0-beta2

This commit is contained in:
dP
2020-01-06 18:49:34 +03:00
parent 599ccf0c2b
commit c7c3966eec
1366 changed files with 2926 additions and 5639 deletions

View File

@@ -1,5 +1,3 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -240,8 +238,7 @@ static void DistributeCommandPacket(CommandPacket &cp, const NetworkClientSocket
CommandCallback *callback = cp.callback;
cp.frame = _frame_counter_max + 1;
NetworkClientSocket *cs;
FOR_ALL_CLIENT_SOCKETS(cs) {
for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) {
if (cs->status >= NetworkClientSocket::STATUS_MAP) {
/* Callbacks are only send back to the client who sent them in the
* first place. This filters that out. */
@@ -251,8 +248,8 @@ static void DistributeCommandPacket(CommandPacket &cp, const NetworkClientSocket
}
}
cp.callback = (cs != owner) ? nullptr : callback;
cp.my_cmd = (cs == owner);
cp.callback = (nullptr != owner) ? nullptr : callback;
cp.my_cmd = (nullptr == owner);
_local_execution_queue.Append(&cp);
}
@@ -285,8 +282,7 @@ void NetworkDistributeCommands()
DistributeQueue(&_local_wait_queue, nullptr);
/* Then send the queues of the others. */
NetworkClientSocket *cs;
FOR_ALL_CLIENT_SOCKETS(cs) {
for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) {
DistributeQueue(&cs->incoming_queue, cs);
}
}