lighting range bugfix

This commit is contained in:
Justin Aquadro 2011-06-04 06:01:30 +00:00
parent 8894b4a3c5
commit c33b616ae8
2 changed files with 12 additions and 6 deletions

View file

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.5.1.0")]
[assembly: AssemblyFileVersion("0.5.1.0")]
[assembly: AssemblyVersion("0.5.2.0")]
[assembly: AssemblyFileVersion("0.5.2.0")]

View file

@ -69,13 +69,19 @@ namespace Substrate
_update.Enqueue(primary);
BlockInfo info = _blockset.GetInfo(lx, ly, lz);
//if (info.Luminance > BlockInfo.MIN_LUMINANCE || info.TransmitsLight) {
QueueRelight(new BlockKey(lx - 1, ly, lz));
QueueRelight(new BlockKey(lx + 1, ly, lz));
if (ly > 0) {
QueueRelight(new BlockKey(lx, ly - 1, lz));
}
if (ly < _ydim - 1) {
QueueRelight(new BlockKey(lx, ly + 1, lz));
QueueRelight(new BlockKey(lx, ly, lz - 1));
QueueRelight(new BlockKey(lx, ly, lz + 1));
}
QueueRelight(new BlockKey(lx - 1, ly, lz));
QueueRelight(new BlockKey(lx + 1, ly, lz));
QueueRelight(new BlockKey(lx, ly, lz - 1));
QueueRelight(new BlockKey(lx, ly, lz + 1));
//}
UpdateBlockLight();