Minor fixes in lights

master
Eduardo Bart 12 years ago
parent 6e154f6b2c
commit f851bb7777

@ -211,7 +211,7 @@ void Painter::updateGlCompositionMode()
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA); glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA);
break; break;
case CompositionMode_Light: case CompositionMode_Light:
glBlendFunc(GL_SRC_ALPHA, GL_SRC_COLOR); glBlendFunc(GL_ZERO, GL_SRC_COLOR);
break; break;
} }
} }

@ -138,7 +138,7 @@ void Tile::draw(const Point& dest, float scaleFactor, int drawFlags, LightView *
// draw translucent light (for tiles beneath holes) // draw translucent light (for tiles beneath holes)
if(hasTranslucentLight() && lightView) { if(hasTranslucentLight() && lightView) {
Light light; Light light;
light.intensity = 2; light.intensity = 1;
lightView->addLightSource(dest + Point(16,16) * scaleFactor, scaleFactor, light); lightView->addLightSource(dest + Point(16,16) * scaleFactor, scaleFactor, light);
} }
} }
@ -595,7 +595,7 @@ bool Tile::hasElevation(int elevation)
void Tile::checkTranslucentLight() void Tile::checkTranslucentLight()
{ {
if(m_position.z < Otc::SEA_FLOOR) if(m_position.z != Otc::SEA_FLOOR)
return; return;
Position downPos = m_position; Position downPos = m_position;

Loading…
Cancel
Save