[TUTORIAL] Fog Of War

A little help

Hey guys, i have been following this thread for some time, trying to implement the fog of war in an already existing project running UE4 ver 4.11.2, my project already has dynamic textures working, so the RHI Core and the Materials are working, but i can´t manage to compile the project with the code from this tutorial, the errors displayed in VSC are:



Error	C2084	function 'AFogOfWarManager::AFogOfWarManager(const FObjectInitializer &)' **already has a body	**ThirdPersonDef	C:\Users\Milo\Documents\Unreal Projects\ThirdPersonDef\Source\ThirdPersonDef\FogOfWarManager.cpp	6
Error	C2664	'double modf(double,double *)': **cannot convert argument 2 from 'float *' to 'double ***'	ThirdPersonDef	C:\Users\Milo\Documents\Unreal Projects\ThirdPersonDef\Source\ThirdPersonDef\FogOfWarWorker.cpp 	73	

The errors are related to this part of the code

in FogOfWarManager.cpp line 6:


#include "ThirdPersonDef.h"
#include "FogOfWarManager.h"

AFogOfWarManager::AFogOfWarManager(const FObjectInitializer &FOI) : Super(FOI) {
	PrimaryActorTick.bCanEverTick = true;
	textureRegions = new FUpdateTextureRegion2D(0, 0, 0, 0, TextureSize, TextureSize);

....


And in FogOfWarWorker.cpp line 73




...

		FVector2D fractions = FVector2D(modf(position.X / 50.0f, &integerX), modf(position.Y / 50.0f, &integerY));
		FVector2D textureSpacePos = FVector2D(posX, posY);
		int size = (int)Manager->TextureSize;
...



I was wondering if any one had this errors while moving the project from 4.9 to 4.11.2 ?