summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-05-02 09:50:36 +0200
committerGitHub <noreply@github.com>2018-05-02 09:50:36 +0200
commita4dbb5c58270959884c17d720185da06464fa256 (patch)
tree2b4e81410e90e059f51726e6c9a01c03fcbfb98d /src/Chunk.cpp
parenttolua++ bindings use nullptr. (#4219) (diff)
downloadcuberite-a4dbb5c58270959884c17d720185da06464fa256.tar
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.gz
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.bz2
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.lz
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.xz
cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.zst
cuberite-a4dbb5c58270959884c17d720185da06464fa256.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index ff3ff7243..f43b5b4bb 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -539,7 +539,7 @@ void cChunk::CollectMobCensus(cMobCensus & toFill)
// LOGD("Counting entity #%i (%s)", (*itr)->GetUniqueID(), (*itr)->GetClass());
if (entity->IsMob())
{
- auto & Monster = reinterpret_cast<cMonster &>(*entity);
+ auto & Monster = static_cast<cMonster &>(*entity);
currentPosition = Monster.GetPosition();
for (const auto & PlayerPos : PlayerPositions)
{
@@ -1902,11 +1902,11 @@ void cChunk::CollectPickupsByPlayer(cPlayer & a_Player)
MarkDirty();
if (Entity->IsPickup())
{
- reinterpret_cast<cPickup *>(Entity.get())->CollectedBy(a_Player);
+ static_cast<cPickup &>(*Entity).CollectedBy(a_Player);
}
else
{
- reinterpret_cast<cProjectileEntity *>(Entity.get())->CollectedBy(a_Player);
+ static_cast<cProjectileEntity &>(*Entity).CollectedBy(a_Player);
}
}
else if (SqrDist < 5 * 5)