mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 08:45:00 +01:00
Simplify boolean expresions
This commit is contained in:
committed by
Michael Steenbeek
parent
9af568d97c
commit
6833da77e3
@@ -986,7 +986,7 @@ void Network::SendPacketToClients(NetworkPacket& packet, bool front, bool gameCm
|
||||
bool Network::CheckSRAND(uint32_t tick, uint32_t srand0)
|
||||
{
|
||||
// We have to wait for the map to be loaded first, ticks may match current loaded map.
|
||||
if (_clientMapLoaded == false)
|
||||
if (!_clientMapLoaded)
|
||||
return true;
|
||||
|
||||
auto itTickData = _serverTickData.find(tick);
|
||||
@@ -999,7 +999,7 @@ bool Network::CheckSRAND(uint32_t tick, uint32_t srand0)
|
||||
if (storedTick.srand0 != srand0)
|
||||
return false;
|
||||
|
||||
if (storedTick.spriteHash.empty() == false)
|
||||
if (!storedTick.spriteHash.empty())
|
||||
{
|
||||
rct_sprite_checksum checksum = sprite_checksum();
|
||||
std::string clientSpriteHash = checksum.ToString();
|
||||
@@ -2198,7 +2198,7 @@ NetworkPlayer* Network::AddPlayer(const std::string& name, const std::string& ke
|
||||
if (networkUser == nullptr)
|
||||
{
|
||||
player->Group = GetDefaultGroup();
|
||||
if (name.empty() == false)
|
||||
if (!name.empty())
|
||||
{
|
||||
player->SetName(MakePlayerNameUnique(String::Trim(name)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user