Ivan Savenko 1 rok pred
rodič
commit
388d65d6b2

+ 1 - 1
lib/StartInfo.h

@@ -152,7 +152,7 @@ struct DLL_LINKAGE StartInfo : public Serializeable
 		h & playerInfos;
 		if (h.version < Handler::Version::REMOVE_LIB_RNG)
 		{
-			uint32_t oldSeeds;
+			uint32_t oldSeeds = 0;
 			h & oldSeeds;
 			h & oldSeeds;
 			h & oldSeeds;

+ 4 - 0
lib/gameState/RumorState.cpp

@@ -10,6 +10,8 @@
 #include "StdInc.h"
 #include "RumorState.h"
 
+VCMI_LIB_NAMESPACE_BEGIN
+
 bool RumorState::update(int id, int extra)
 {
 	if(vstd::contains(last, type))
@@ -27,3 +29,5 @@ bool RumorState::update(int id, int extra)
 
 	return true;
 }
+
+VCMI_LIB_NAMESPACE_END

+ 1 - 1
lib/mapObjects/MiscObjects.cpp

@@ -705,7 +705,7 @@ void CGWhirlpool::teleportDialogAnswered(const CGHeroInstance *hero, ui32 answer
 
 		const auto * obj = cb->getObj(exit);
 		std::set<int3> tiles = obj->getBlockedPos();
-		dPos = *RandomGeneratorUtil::nextItem(tiles, cb->gameState()->getRandomGenerator()));
+		dPos = *RandomGeneratorUtil::nextItem(tiles, cb->gameState()->getRandomGenerator());
 	}
 
 	cb->moveHero(hero->id, hero->convertFromVisitablePos(dPos), EMovementMode::MONOLITH);