Disable light modifier on fog, seems not to work .. values don't make sense. Maybe the model3 doesn't use these.

This commit is contained in:
Ian Curtis 2016-05-13 19:26:10 +00:00
parent c8f8cd1655
commit c4b5b185c6

View file

@ -341,6 +341,8 @@ void CNew3D::DescendCullingNode(UINT32 addr)
node2Ptr = node[0x08 - m_offset]; node2Ptr = node[0x08 - m_offset];
matrixOffset = node[0x03 - m_offset] & 0xFFF; matrixOffset = node[0x03 - m_offset] & 0xFFF;
short extent = node[9 - m_offset] >> 16;
// seems to indicate second link is invalid (fixes circular references) // seems to indicate second link is invalid (fixes circular references)
if ((node[0x00] & 0x07) != 0x06) { if ((node[0x00] & 0x07) != 0x06) {
DescendNodePtr(node2Ptr); DescendNodePtr(node2Ptr);
@ -877,12 +879,15 @@ void CNew3D::CacheModel(Model *m, const UINT32 *data)
currentMesh->polyAlpha = ph.PolyAlpha(); currentMesh->polyAlpha = ph.PolyAlpha();
currentMesh->lighting = ph.LightEnabled() && !ph.FixedShading(); currentMesh->lighting = ph.LightEnabled() && !ph.FixedShading();
/*
if (!ph.Luminous()) { if (!ph.Luminous()) {
currentMesh->fogIntensity = 1.0f; currentMesh->fogIntensity = 1.0f;
} }
else { else {
currentMesh->fogIntensity = ph.LightModifier(); currentMesh->fogIntensity = ph.LightModifier();
} }*/
currentMesh->fogIntensity = 1.0;
if (ph.TexEnabled()) { if (ph.TexEnabled()) {
currentMesh->format = ph.TexFormat(); currentMesh->format = ph.TexFormat();