mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Rename for clarity
This commit is contained in:
parent
0a296add0c
commit
e89e5d2127
@ -146,6 +146,11 @@ CServerHandler::CServerHandler()
|
||||
registerTypesLobbyPacks(*applier);
|
||||
}
|
||||
|
||||
void CServerHandler::setHighScoreCalc(const std::shared_ptr<HighScoreCalculation> &newHighScoreCalc)
|
||||
{
|
||||
campaignScoreCalculator = newHighScoreCalc;
|
||||
}
|
||||
|
||||
void CServerHandler::threadRunNetwork()
|
||||
{
|
||||
logGlobal->info("Starting network thread");
|
||||
@ -627,7 +632,7 @@ void CServerHandler::startGameplay(VCMI_LIB_WRAP_NAMESPACE(CGameState) * gameSta
|
||||
if(CMM)
|
||||
CMM->disable();
|
||||
|
||||
highScoreCalc = nullptr;
|
||||
campaignScoreCalculator = nullptr;
|
||||
|
||||
switch(si->mode)
|
||||
{
|
||||
@ -735,14 +740,14 @@ void CServerHandler::startCampaignScenario(HighScoreParameter param, std::shared
|
||||
if (!cs)
|
||||
ourCampaign = si->campState;
|
||||
|
||||
if(highScoreCalc == nullptr)
|
||||
if(campaignScoreCalculator == nullptr)
|
||||
{
|
||||
highScoreCalc = std::make_shared<HighScoreCalculation>();
|
||||
highScoreCalc->isCampaign = true;
|
||||
highScoreCalc->parameters.clear();
|
||||
campaignScoreCalculator = std::make_shared<HighScoreCalculation>();
|
||||
campaignScoreCalculator->isCampaign = true;
|
||||
campaignScoreCalculator->parameters.clear();
|
||||
}
|
||||
param.campaignName = cs->getNameTranslated();
|
||||
highScoreCalc->parameters.push_back(param);
|
||||
campaignScoreCalculator->parameters.push_back(param);
|
||||
|
||||
endGameplay();
|
||||
|
||||
@ -763,7 +768,7 @@ void CServerHandler::startCampaignScenario(HighScoreParameter param, std::shared
|
||||
else
|
||||
{
|
||||
CMM->openCampaignScreen(ourCampaign->campaignSet);
|
||||
GH.windows().createAndPushWindow<CHighScoreInputScreen>(true, *highScoreCalc);
|
||||
GH.windows().createAndPushWindow<CHighScoreInputScreen>(true, *campaignScoreCalculator);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -106,7 +106,7 @@ class CServerHandler final : public IServerAPI, public LobbyInfo, public INetwor
|
||||
std::unique_ptr<IServerRunner> serverRunner;
|
||||
std::shared_ptr<CMapInfo> mapToStart;
|
||||
std::vector<std::string> localPlayerNames;
|
||||
std::shared_ptr<HighScoreCalculation> highScoreCalc;
|
||||
std::shared_ptr<HighScoreCalculation> campaignScoreCalculator;
|
||||
|
||||
boost::thread threadNetwork;
|
||||
|
||||
@ -219,6 +219,7 @@ public:
|
||||
|
||||
void visitForLobby(CPackForLobby & lobbyPack);
|
||||
void visitForClient(CPackForClient & clientPack);
|
||||
void setHighScoreCalc(const std::shared_ptr<HighScoreCalculation> &newHighScoreCalc);
|
||||
};
|
||||
|
||||
extern CServerHandler * CSH;
|
||||
|
Loading…
Reference in New Issue
Block a user