Michael 2 lat temu
rodzic
commit
4784ae94b5
4 zmienionych plików z 9 dodań i 7 usunięć
  1. 0 4
      Global.h
  2. 3 0
      client/CServerHandler.cpp
  3. 1 3
      lib/StartInfo.h
  4. 5 0
      server/CVCMIServer.cpp

+ 0 - 4
Global.h

@@ -121,7 +121,6 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
 #include <optional>
 #include <queue>
 #include <random>
-#include <regex>
 #include <set>
 #include <sstream>
 #include <string>
@@ -167,9 +166,6 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
 #include <boost/range/adaptor/reversed.hpp>
 #include <boost/range/algorithm.hpp>
 #include <boost/thread.hpp>
-#include <boost/uuid/uuid.hpp>
-#include <boost/uuid/uuid_generators.hpp>
-#include <boost/uuid/uuid_io.hpp>
 
 #ifndef M_PI
 #  define M_PI 3.14159265358979323846

+ 3 - 0
client/CServerHandler.cpp

@@ -49,6 +49,9 @@
 #include "../lib/serializer/Connection.h"
 #include "../lib/serializer/CMemorySerializer.h"
 
+#include <boost/uuid/uuid.hpp>
+#include <boost/uuid/uuid_io.hpp>
+#include <boost/uuid/uuid_generators.hpp>
 #include <boost/asio.hpp>
 #include "../lib/serializer/Cast.h"
 #include "LobbyClientNetPackVisitors.h"

+ 1 - 3
lib/StartInfo.h

@@ -83,7 +83,6 @@ struct DLL_LINKAGE StartInfo
 	ui32 seedToBeUsed; //0 if not sure (client requests server to decide, will be send in reply pack)
 	ui32 seedPostInit; //so we know that game is correctly synced at the start; 0 if not known yet
 	ui32 mapfileChecksum; //0 if not relevant
-	std::string gameUuid;
 	std::string startTimeIso8601;
 	TurnTimerInfo turnTimerInfo;
 	std::string mapname; // empty for random map, otherwise name of the map or savegame
@@ -108,7 +107,6 @@ struct DLL_LINKAGE StartInfo
 		h & seedToBeUsed;
 		h & seedPostInit;
 		h & mapfileChecksum;
-		h & gameUuid;
 		h & startTimeIso8601;
 		h & turnTimerInfo;
 		h & mapname;
@@ -117,7 +115,7 @@ struct DLL_LINKAGE StartInfo
 	}
 
 	StartInfo() : mode(INVALID), difficulty(1), seedToBeUsed(0), seedPostInit(0),
-		mapfileChecksum(0), gameUuid(boost::uuids::to_string(boost::uuids::random_generator()())), startTimeIso8601(vstd::getDateTimeISO8601Basic(std::time(0)))
+		mapfileChecksum(0), startTimeIso8601(vstd::getDateTimeISO8601Basic(std::time(0)))
 	{
 
 	}

+ 5 - 0
server/CVCMIServer.cpp

@@ -50,6 +50,11 @@
 // for applier
 #include "../lib/registerTypes/RegisterTypes.h"
 
+// UUID generation
+#include <boost/uuid/uuid.hpp>
+#include <boost/uuid/uuid_io.hpp>
+#include <boost/uuid/uuid_generators.hpp>
+
 #include "../lib/gameState/CGameState.h"
 
 template<typename T> class CApplyOnServer;