1
0

Update to allow the light map to remain the same, but allow alteration of sky light values based on time.

This commit is contained in:
Samuel Barney
2013-10-29 10:44:51 -06:00
parent d7a490a992
commit e1a06153b2
7 changed files with 73 additions and 17 deletions

View File

@@ -533,8 +533,7 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner)
if (IsLightValid())
{
int TimeOfDay = m_World->GetTimeOfDay();
cEntity* newMob = a_MobSpawner.TryToSpawnHere(this, Try_X, Try_Y, Try_Z, Biome, TimeOfDay, MaxNbOfSuccess);
cEntity* newMob = a_MobSpawner.TryToSpawnHere(this, Try_X, Try_Y, Try_Z, Biome, MaxNbOfSuccess);
if (newMob)
{
int WorldX, WorldY, WorldZ;
@@ -2787,6 +2786,16 @@ Vector3i cChunk::PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ)
NIBBLETYPE cChunk::GetTimeAlteredLight(NIBBLETYPE a_Skylight) const
{
a_Skylight -= m_World->GetSkyDarkness();
return (a_Skylight < 16)? a_Skylight : 0;
}
#if !C_CHUNK_USE_INLINE
# include "cChunk.inl.h"
#endif