summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Spider.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Spider.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp
index a5f0d6a89..5ee3e3294 100644
--- a/src/Mobs/Spider.cpp
+++ b/src/Mobs/Spider.cpp
@@ -35,7 +35,7 @@ void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
-void cSpider::EventSeePlayer(cEntity * a_Entity, cChunk & a_Chunk)
+void cSpider::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
{
if (!GetWorld()->IsChunkLighted(GetChunkX(), GetChunkZ()))
{
@@ -48,9 +48,9 @@ void cSpider::EventSeePlayer(cEntity * a_Entity, cChunk & a_Chunk)
return;
}
- if (!static_cast<cPlayer *>(a_Entity)->IsGameModeCreative() && (Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) <= 9))
+ if (a_Player->CanMobsTarget() && (Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) <= 9))
{
- super::EventSeePlayer(a_Entity, a_Chunk);
+ super::EventSeePlayer(a_Player, a_Chunk);
}
}