Minor fixes in lights

This commit is contained in:
Eduardo Bart 2012-11-30 09:03:42 -02:00
parent 6e154f6b2c
commit f851bb7777
2 changed files with 3 additions and 3 deletions

View File

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

View File

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