diff options
author | bibo38 <bibo38@users.noreply.github.com> | 2016-10-12 14:38:45 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-10-12 14:38:45 +0200 |
commit | cb640ffea4a51a10db2e379ada8dc0487378ba09 (patch) | |
tree | 780ff243f439c9663b2f88e5df2805cc503f4f1d /src/Mobs/Spider.cpp | |
parent | Fixed cProjectileEntity double destroy bug (#3397) (diff) | |
download | cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.gz cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.bz2 cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.lz cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.xz cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.tar.zst cuberite-cb640ffea4a51a10db2e379ada8dc0487378ba09.zip |
Diffstat (limited to 'src/Mobs/Spider.cpp')
-rw-r--r-- | src/Mobs/Spider.cpp | 6 |
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); } } |