Revert "dynamic_pointer_cast -> std::dynamic_pointer_cast"
This reverts commit 07ad68bc15.
This commit is contained in:
@@ -156,7 +156,7 @@ bool HangingEntity::survives()
|
||||
for (AUTO_VAR(it, entities->begin()); it != itEnd; it++)
|
||||
{
|
||||
std::shared_ptr<Entity> e = (*it);
|
||||
if(std::dynamic_pointer_cast<HangingEntity>(e) != NULL)
|
||||
if(dynamic_pointer_cast<HangingEntity>(e) != NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ bool HangingEntity::skipAttackInteraction(std::shared_ptr<Entity> source)
|
||||
{
|
||||
if(source->GetType()==eTYPE_PLAYER)
|
||||
{
|
||||
return hurt(DamageSource::playerAttack(std::dynamic_pointer_cast<Player>( source)), 0);
|
||||
return hurt(DamageSource::playerAttack(dynamic_pointer_cast<Player>( source)), 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ bool HangingEntity::hurt(DamageSource *source, int damage)
|
||||
{
|
||||
std::shared_ptr<Entity> sourceEntity = source->getDirectEntity();
|
||||
|
||||
if (std::dynamic_pointer_cast<Player>(sourceEntity) != NULL && !std::dynamic_pointer_cast<Player>(sourceEntity)->isAllowedToHurtEntity(shared_from_this()) )
|
||||
if (dynamic_pointer_cast<Player>(sourceEntity) != NULL && !dynamic_pointer_cast<Player>(sourceEntity)->isAllowedToHurtEntity(shared_from_this()) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ bool HangingEntity::hurt(DamageSource *source, int damage)
|
||||
std::shared_ptr<Entity> e = source->getEntity();
|
||||
if (e!=NULL && ((e->GetType() & eTYPE_PLAYER)!=0) ) // check if it's serverplayer or player
|
||||
{
|
||||
player = std::dynamic_pointer_cast<Player>( e );
|
||||
player = dynamic_pointer_cast<Player>( e );
|
||||
}
|
||||
|
||||
if (player != NULL && player->abilities.instabuild)
|
||||
|
||||
Reference in New Issue
Block a user