summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-03-05 12:05:16 +0100
committerGitHub <noreply@github.com>2017-03-05 12:05:16 +0100
commit532f6d4b431f940432e82b7fc7826652b7a4520d (patch)
tree87976ae53507e12cdfa3b0a90a481bc357ff839c
parente6952cad3ac1f80a40f29c950ed15b9d8bb8b588 (diff)
parent962243f931917c3055e73c387853fe1e7f255395 (diff)
Merge pull request #7954 from Hinsbart/tilemap_self_modulate
TileMap: Respect self_modulate property
-rw-r--r--scene/2d/tile_map.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 15fbec4441..f89a72e1b9 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -458,6 +458,9 @@ void TileMap::_update_dirty_quadrants() {
Color modulate = tile_set->tile_get_modulate(c.id);
+ Color self_modulate = get_self_modulate();
+ modulate = Color(modulate.r*self_modulate.r, modulate.g*self_modulate.g,
+ modulate.b*self_modulate.b, modulate.a*self_modulate.a);
if (r==Rect2()) {
tex->draw_rect(canvas_item,rect,false,modulate,c.transpose);
} else {