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]