Fixes another lighting bug and a couple regressions from 0.5.2

This commit is contained in:
Justin Aquadro 2011-06-04 16:16:01 +00:00
parent 8a3e973a58
commit 4097b44c22
4 changed files with 11 additions and 13 deletions

View file

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

View file

@ -199,20 +199,18 @@ namespace Substrate
} }
} }
// Update height map // Light consistency
if (_autoLight) {
if (info1.ObscuresLight != info2.ObscuresLight) { if (info1.ObscuresLight != info2.ObscuresLight) {
_lightManager.UpdateHeightMap(x, y, z); _lightManager.UpdateHeightMap(x, y, z);
} }
// Light consistency if (info1.Luminance != info2.Luminance || info1.Opacity != info2.Opacity || info1.TransmitsLight != info2.TransmitsLight) {
if (_autoLight) {
if (info1.Luminance != info2.Luminance || info1.Opacity != info2.Opacity) {
UpdateBlockLight(x, y, z); UpdateBlockLight(x, y, z);
} }
if (info1.Opacity != info2.Opacity) { if (info1.Opacity != info2.Opacity || info1.TransmitsLight != info2.TransmitsLight) {
UpdateSkyLight(x, y, z); UpdateSkyLight(x, y, z);
} }
} }

View file

@ -401,8 +401,8 @@ namespace Substrate
Bedrock = new BlockInfo(7, "Bedrock"); Bedrock = new BlockInfo(7, "Bedrock");
Water = new BlockInfo(8, "Water").SetOpacity(3).SetState(BlockState.FLUID); Water = new BlockInfo(8, "Water").SetOpacity(3).SetState(BlockState.FLUID);
StationaryWater = new BlockInfo(9, "Stationary Water").SetOpacity(3).SetState(BlockState.FLUID); StationaryWater = new BlockInfo(9, "Stationary Water").SetOpacity(3).SetState(BlockState.FLUID);
Lava = new BlockInfo(10, "Lava").SetLuminance(MAX_LUMINANCE).SetState(BlockState.FLUID); Lava = new BlockInfo(10, "Lava").SetOpacity(0).SetLuminance(MAX_LUMINANCE).SetState(BlockState.FLUID);
StationaryLava = new BlockInfo(11, "Stationary Lava").SetLuminance(MAX_LUMINANCE).SetState(BlockState.FLUID); StationaryLava = new BlockInfo(11, "Stationary Lava").SetOpacity(0).SetLuminance(MAX_LUMINANCE).SetState(BlockState.FLUID);
Sand = new BlockInfo(12, "Sand"); Sand = new BlockInfo(12, "Sand");
Gravel = new BlockInfo(13, "Gravel"); Gravel = new BlockInfo(13, "Gravel");
GoldOre = new BlockInfo(14, "Gold Ore"); GoldOre = new BlockInfo(14, "Gold Ore");

View file

@ -383,7 +383,7 @@ namespace Substrate
public bool SaveChunk (Chunk chunk) public bool SaveChunk (Chunk chunk)
{ {
Console.WriteLine("Region[{0}, {1}].Save({2}, {3})", _rx, _rz, ForeignX(chunk.X),ForeignZ(chunk.Z)); //Console.WriteLine("Region[{0}, {1}].Save({2}, {3})", _rx, _rz, ForeignX(chunk.X),ForeignZ(chunk.Z));
return chunk.Save(GetChunkOutStream(ForeignX(chunk.X), ForeignZ(chunk.Z))); return chunk.Save(GetChunkOutStream(ForeignX(chunk.X), ForeignZ(chunk.Z)));
} }