forked from metin-server/m2dev-client-src
Refactor fog settings handling in MapUtil
This commit is contained in:
@@ -117,14 +117,20 @@ bool Environment_Load(SEnvironmentData& envData, const char* envFileName)
|
|||||||
|
|
||||||
if (textLoader.SetChildNode("fog"))
|
if (textLoader.SetChildNode("fog"))
|
||||||
{
|
{
|
||||||
// MR-14: Fog update by Alaric
|
if (textLoader.GetTokenByte("foglevel", &envData.bFogLevel))
|
||||||
// textLoader.GetTokenBoolean("enable", &envData.bFogEnable);
|
{
|
||||||
// textLoader.GetTokenBoolean("isdensity", &envData.bDensityFog);
|
envData.bDensityFog = true;
|
||||||
// textLoader.GetTokenFloat("neardistance", &envData.m_fFogNearDistance);
|
}
|
||||||
// textLoader.GetTokenFloat("fardistance", &envData.m_fFogFarDistance);
|
else
|
||||||
textLoader.GetTokenByte("foglevel", &envData.bFogLevel);
|
{
|
||||||
// MR-14: -- END OF -- Fog update by Alaric
|
envData.bDensityFog = false;
|
||||||
|
textLoader.GetTokenBoolean("enable", &envData.bFogEnable);
|
||||||
|
textLoader.GetTokenFloat("neardistance", &envData.m_fFogNearDistance);
|
||||||
|
textLoader.GetTokenFloat("fardistance", &envData.m_fFogFarDistance);
|
||||||
|
}
|
||||||
|
|
||||||
textLoader.GetTokenColor("color", &envData.FogColor);
|
textLoader.GetTokenColor("color", &envData.FogColor);
|
||||||
|
|
||||||
textLoader.SetParentNode();
|
textLoader.SetParentNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user