1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Update src/openrct2/network/Network.cpp

Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
Ted John
2020-04-30 02:14:33 +01:00
committed by GitHub
parent f642597098
commit 7897df140d

View File

@@ -671,10 +671,10 @@ NetworkConnection* Network::GetPlayerConnection(uint8_t id)
auto player = GetPlayerByID(id);
if (player != nullptr)
{
return std::find_if(
auto clientIt = std::find_if(
client_connection_list.begin(), client_connection_list.end(),
[player](const auto& conn) -> bool { return conn->Player == player; })
->get();
[player](const auto& conn) -> bool { return conn->Player == player; });
return clientIt != client_connection_list.end() ? clientIt->get() : nullptr;
}
return nullptr;
}