[Chat] Do what snake suggested in /master for lambdas (#442)
This commit is contained in:
parent
33cbd3f1c9
commit
2f6cbf4549
@ -236,16 +236,12 @@ namespace Components
|
||||
|
||||
bool Chat::IsMuted(const Game::gentity_s* ent)
|
||||
{
|
||||
auto result = false;
|
||||
const auto clientNum = ent->s.number;
|
||||
const auto xuid = Game::svs_clients[clientNum].steamID;
|
||||
|
||||
MutedList.access([&](muteList& clients)
|
||||
const auto result = MutedList.access<bool>([&](muteList& clients)
|
||||
{
|
||||
if (clients.contains(xuid))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
return clients.contains(xuid);
|
||||
});
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user