Browse Source

Fix build

Ivan Savenko 7 months ago
parent
commit
99c6ca7e70
2 changed files with 3 additions and 3 deletions
  1. 1 1
      lib/entities/faction/CTown.h
  2. 2 2
      server/CGameHandler.cpp

+ 1 - 1
lib/entities/faction/CTown.h

@@ -37,7 +37,7 @@ struct DLL_LINKAGE CStructure
 	bool hiddenUpgrade; // used only if "building" is upgrade, if true - structure on town screen will behave exactly like parent (mouse clicks, hover texts, etc)
 };
 
-class DLL_LINKAGE CTown
+class DLL_LINKAGE CTown : boost::noncopyable
 {
 	friend class CTownHandler;
 	size_t namesCount = 0;

+ 2 - 2
server/CGameHandler.cpp

@@ -421,7 +421,7 @@ void CGameHandler::changeSecSkill(const CGHeroInstance * hero, SecondarySkill wh
 
 void CGameHandler::handleClientDisconnection(std::shared_ptr<CConnection> c)
 {
-	if(gameLobby().getState() == EServerState::SHUTDOWN || !gs || !gs->scenarioOps)
+	if(gameLobby().getState() == EServerState::SHUTDOWN || !gs || !gs->getStartInfo())
 	{
 		assert(0); // game should have shut down before reaching this point!
 		return;
@@ -430,7 +430,7 @@ void CGameHandler::handleClientDisconnection(std::shared_ptr<CConnection> c)
 	for(auto & playerConnections : connections)
 	{
 		PlayerColor playerId = playerConnections.first;
-		auto * playerSettings = gs->scenarioOps->getPlayersSettings(playerId.getNum());
+		auto * playerSettings = gs->getStartInfo()->getPlayersSettings(playerId.getNum());
 		if(!playerSettings)
 			continue;