diff --git a/source/Chunk.cpp b/source/Chunk.cpp index 0d6ce335d..00010e806 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -451,7 +451,7 @@ void cChunk::CollectMobCensus(cMobCensus& toFill) { try { - cMonster& Monster = (cMonster&)(**itr); + cMonster& Monster = dynamic_cast(**itr); currentPosition = Monster.GetPosition(); for (std::list::const_iterator itr2 = playerPositions.begin(); itr2 != playerPositions.end(); itr2 ++) {