tweak scroll fog logic

This commit is contained in:
Ian Curtis 2016-12-04 22:37:49 +00:00
parent adbebb0204
commit eece2d75b4

View file

@ -93,7 +93,9 @@ void CNew3D::DrawScrollFog()
for (auto &n : m_nodes) { for (auto &n : m_nodes) {
if (n.viewport.scrollFog > 0 && n.viewport.priority==i) { if (n.viewport.scrollFog > 0 && n.viewport.priority == i) {
if (n.viewport.fogParams[3] || n.viewport.fogParams[4]) { // check we some fog values set density or start
float *rgb = n.viewport.fogParams; float *rgb = n.viewport.fogParams;
m_r3dScrollFog.DrawScrollFog(rgb[0], rgb[1], rgb[2], n.viewport.scrollFog); m_r3dScrollFog.DrawScrollFog(rgb[0], rgb[1], rgb[2], n.viewport.scrollFog);
@ -102,6 +104,7 @@ void CNew3D::DrawScrollFog()
} }
} }
} }
}
} }
void CNew3D::RenderScene(int priority, bool alpha) void CNew3D::RenderScene(int priority, bool alpha)