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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user