Fix blocks not being tinted in singleplayer. (Thanks Kingoscargames1)

This commit is contained in:
UnknownShadow200 2017-07-11 23:57:34 +10:00
parent 3249b7c682
commit c05d6ee882
2 changed files with 2 additions and 1 deletions

View File

@ -161,6 +161,7 @@ namespace ClassicalSharp.Map {
// Fix for older ClassicalSharp versions which saved wrong fog density value
if (data[0] == 0xFF) info.FogDensity[id] = 0;
info.FogColour[id] = new FastColour(data[1], data[2], data[3]);
info.Tinted[id] = info.FogColour[id] != FastColour.Black && info.Name[id].IndexOf('#') >= 0; // TODO: nasty copy paste
data = (byte[])compound["Coords"].Value;
info.MinBB[id] = new Vector3(data[0] / 16f, data[1] / 16f, data[2] / 16f);

View File

@ -223,7 +223,7 @@ namespace ClassicalSharp.Network {
void OnNewMap(object sender, EventArgs e) {
// wipe all existing entity states
for (int i = 0; i < 256; i++)
for (int i = 0; i < EntityList.MaxCount; i++)
RemoveEntity((byte)i);
}