From 67859ada0abfa2a5e60ef15612bec74f77e6fc85 Mon Sep 17 00:00:00 2001 From: Japa Date: Thu, 27 Jun 2013 02:49:18 +0530 Subject: [PATCH] Changed sun calculation direction. --- plugins/rendermax/renderer_light.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rendermax/renderer_light.cpp b/plugins/rendermax/renderer_light.cpp index ab3910fd7..6d4b2ce58 100644 --- a/plugins/rendermax/renderer_light.cpp +++ b/plugins/rendermax/renderer_light.cpp @@ -562,7 +562,7 @@ void lightingEngineViewscreen::doSun(const lightSource& sky,MapExtras::MapCache& cellArray[block_x][block_y] = sky.power; int emptyCell=0; - for(int z=df::global::world->map.z_count-1;z>=window_z && emptyCell<256;z--) + for(int z=window_z;z< df::global::world->map.z_count && emptyCell<256;z++) { MapExtras::Block* b=map.BlockAt(DFCoord(blockX,blockY,z)); if(!b)