Small fixes

develop
Warmist 2013-06-24 00:53:39 +03:00
parent f5f1328678
commit 8c9de79812
1 changed files with 21 additions and 23 deletions

@ -283,10 +283,9 @@ void lightingEngineViewscreen::doOcupancyAndLights()
{ {
df::map_block* block=Maps::getBlock(blockx,blocky,ZZ); df::map_block* block=Maps::getBlock(blockx,blocky,ZZ);
totalBlank = 0; totalBlank = 0;
if(block)
for(int block_x = 0; block_x < 16; block_x++) for(int block_x = 0; block_x < 16; block_x++)
for(int block_y = 0; block_y < 16; block_y++) for(int block_y = 0; block_y < 16; block_y++)
{
if(block)
{ {
df::tiletype type = block->tiletype[block_x][block_y]; df::tiletype type = block->tiletype[block_x][block_y];
df::tile_designation d = block->designation[block_x][block_y]; df::tile_designation d = block->designation[block_x][block_y];
@ -313,7 +312,6 @@ void lightingEngineViewscreen::doOcupancyAndLights()
{ {
cellArray[block_x][block_y]=lightCell(0,0,0); cellArray[block_x][block_y]=lightCell(0,0,0);
} }
}
if(cellArray[block_x][block_y].r < 0.003f && cellArray[block_x][block_y].g < 0.003f && cellArray[block_x][block_y].b < 0.003f) if(cellArray[block_x][block_y].r < 0.003f && cellArray[block_x][block_y].g < 0.003f && cellArray[block_x][block_y].b < 0.003f)
totalBlank++; totalBlank++;
} }