mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Silenced several "warning: suggest parentheses around ‘&&’ within ‘||’": added some parenthesis, optimized a couple statments and fix a bug in another.
This commit is contained in:
@@ -323,9 +323,9 @@ void CClient::newGame( CConnection *con, StartInfo *si )
|
||||
for(std::map<int, PlayerSettings>::iterator it =si->playerInfos.begin();
|
||||
it != si->playerInfos.end(); ++it)
|
||||
{
|
||||
if(networkMode == SINGLE //single - one client has all player
|
||||
|| networkMode != SINGLE && serv->connectionID == it->second.human //multi - client has only "its players"
|
||||
|| networkMode == HOST && it->second.human == false) //multi - host has all AI players
|
||||
if((networkMode == SINGLE) //single - one client has all player
|
||||
|| (networkMode != SINGLE && serv->connectionID == it->second.human) //multi - client has only "its players"
|
||||
|| (networkMode == HOST && it->second.human == false)) //multi - host has all AI players
|
||||
{
|
||||
myPlayers.insert(ui8(it->first)); //add player
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user