Jump to content

Recommended Posts

binary source

"----UserInterface/PythonApplication.cpp"

Search: 'void CPythonApplication::SetMinFog(float fMinFog)'

//replace the function with 

void CPythonApplication::SetMinFog(float fMinFog)
{
	static float FOG_LEVEL_LIST[] = { 4800.0f, 9600.0f, 12800.0f };
	int index = (int)fMinFog;
	if (index >= 0 && index < 3)
		MIN_FOG = FOG_LEVEL_LIST[index];
	else
		MIN_FOG = fMinFog;

	float fogFar = MIN_FOG * 2.0f;

	CPythonBackground::Instance().SetViewDistanceSet(0, fogFar);
	CPythonBackground::Instance().SelectViewDistanceNum(0);
	CPythonBackground::Instance().ApplyFog();
}

///////////////////////////////////////////
"----UserInterface/PythonBackground.h"

Search: 'void SetViewDistanceSet(int eNum, float fFarClip)'
//Add above 
void ApplyFog();


//////////////////////////////////////////////////
"----UserInterface/PythonBackground.cpp"

Search: 'void CPythonBackground::SetViewDistanceSet(int eNum, float fFarClip)'

//Add above 
void CPythonBackground::ApplyFog()
{
	if (!mc_pcurEnvironmentData)
		return;

	TEnvironmentData* env = (TEnvironmentData*)mc_pcurEnvironmentData;

	if (env->bFogEnable == TRUE)
	{
		env->m_fFogNearDistance = m_ViewDistanceSet[m_eViewDistanceNum].m_fFogStart;
		env->m_fFogFarDistance = m_ViewDistanceSet[m_eViewDistanceNum].m_fFogEnd;
		env->FogColor = D3DXCOLOR(0.69f, 0.74f, 0.83f, 1.0f);
	}
}



now you can change from 'client->pack->root->constinfo.py' 
FOG_LEVEL0 = 9600.0
FOG_LEVEL1 = 12800.0
FOG_LEVEL2 = 16800.0
FOG_LEVEL = FOG_LEVEL0
FOG_LEVEL_LIST=[FOG_LEVEL0, FOG_LEVEL1, FOG_LEVEL2]

.png

.png

  • Metin2 Dev 2
  • Good 1
  • Love 1
Link to comment
https://metin2.dev/topic/34344-fog-fix-with-density-level/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.