From f851bb7777b692d98697959da69821d7d7ab22d5 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Fri, 30 Nov 2012 09:03:42 -0200 Subject: [PATCH] Minor fixes in lights --- src/framework/graphics/painter.cpp | 2 +- src/otclient/tile.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/framework/graphics/painter.cpp b/src/framework/graphics/painter.cpp index c417c128..51daa50e 100644 --- a/src/framework/graphics/painter.cpp +++ b/src/framework/graphics/painter.cpp @@ -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; } } diff --git a/src/otclient/tile.cpp b/src/otclient/tile.cpp index fe5dc8f5..dd6e538f 100644 --- a/src/otclient/tile.cpp +++ b/src/otclient/tile.cpp @@ -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;