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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user