Skip to content

Commit 452cfb4

Browse files
henrymkwsnailspeed3
authored andcommitted
Fix isConnectionStateIdleOrInMM fake match
1 parent b4936a6 commit 452cfb4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/net/NetManager.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,14 @@ s32 NetManager::getTimeDiff() {
169169

170170
bool NetManager::isConnectionStateIdleOrInMM() {
171171
bool idleOrMM = false;
172-
ConnectionState connState = getConnectionState();
173172

174-
// had to write it slightly weird to match
175-
if (connState >= CONNECTION_STATE_IDLE &&
176-
CONNECTION_STATE_IN_MM >= connState) {
173+
switch (getConnectionState()) {
174+
case CONNECTION_STATE_IDLE:
175+
case CONNECTION_STATE_IN_MM:
177176
idleOrMM = true;
177+
break;
178178
}
179+
179180
return idleOrMM;
180181
}
181182

@@ -191,8 +192,8 @@ bool NetManager::isConnectionStateIdle() {
191192
bool NetManager::hasFoundMatch() {
192193
bool inMatch = false;
193194

194-
bool isMyAidInMatch = ((1 << m_matchMakingInfos[m_currMMInfo].m_myAid) &
195-
m_matchMakingInfos[m_currMMInfo].m_fullAidBitmap);
195+
bool isMyAidInMatch = (1 << m_matchMakingInfos[m_currMMInfo].m_myAid) &
196+
m_matchMakingInfos[m_currMMInfo].m_fullAidBitmap;
196197
// were in a match if my aid is in the room and we have connected to another
197198
// console
198199
if (isMyAidInMatch &&

0 commit comments

Comments
 (0)