Skip to content

Commit

Permalink
Fix redundant check ASE
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-A-Rocha committed Oct 3, 2024
1 parent 13ff349 commit 4cb8995
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Server/mods/deathmatch/logic/CGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,17 +960,15 @@ bool CGame::Start(int iArgumentCount, char* szArguments[])
}
}

// If ASE is enabled
// Init ASE
m_pASE = new ASE(m_pMainConfig, m_pPlayerManager, static_cast<int>(usServerPort), strServerIPList);
if (m_pASE) {
if (m_pMainConfig->GetSerialVerificationEnabled())
m_pASE->SetRuleValue("SerialVerification", "yes");

// Set the Rules loaded from config
std::map<SString, SString> rulesMap = m_pMainConfig->GetRulesForASE();
for (const auto& [key, value] : rulesMap)
m_pASE->SetRuleValue(key, value);
}
if (m_pMainConfig->GetSerialVerificationEnabled())
m_pASE->SetRuleValue("SerialVerification", "yes");

// Set the Rules loaded from config
std::map<SString, SString> rulesMap = m_pMainConfig->GetRulesForASE();
for (const auto& [key, value] : rulesMap)
m_pASE->SetRuleValue(key, value);

ApplyAseSetting();
m_pMasterServerAnnouncer = new CMasterServerAnnouncer();
Expand Down

0 comments on commit 4cb8995

Please sign in to comment.