Minor fixes in lights

This commit is contained in:
Eduardo Bart 2012-11-30 09:03:42 -02:00
父節點 6e154f6b2c
當前提交 f851bb7777
共有 2 個檔案被更改,包括 3 行新增3 行删除

查看文件

@ -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;
}
}

查看文件

@ -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;