replacing C-style cast by dynamic_cast
This commit is contained in:
parent
b4bb255344
commit
ead953898d
@ -451,7 +451,7 @@ void cChunk::CollectMobCensus(cMobCensus& toFill)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
cMonster& Monster = (cMonster&)(**itr);
|
cMonster& Monster = dynamic_cast<cMonster&>(**itr);
|
||||||
currentPosition = Monster.GetPosition();
|
currentPosition = Monster.GetPosition();
|
||||||
for (std::list<const Vector3d*>::const_iterator itr2 = playerPositions.begin(); itr2 != playerPositions.end(); itr2 ++)
|
for (std::list<const Vector3d*>::const_iterator itr2 = playerPositions.begin(); itr2 != playerPositions.end(); itr2 ++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user