1
0
Fork 0

Spider should attack only when the light level is lower than 11 (#3815)

This commit is contained in:
Bond-009 2017-06-30 10:48:06 +02:00 committed by Mattes D
parent 7fd3899796
commit 0c0bfe54bb
1 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,10 @@ void cSpider::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
return;
}
if (a_Player->CanMobsTarget() && (Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) <= 9))
if (
a_Player->CanMobsTarget() &&
!((Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) > 11) || (Chunk->GetBlockLight(Rel.x, Rel.y, Rel.z) > 11))
)
{
super::EventSeePlayer(a_Player, a_Chunk);
}