diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:10:34 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:10:34 +0700 |
| commit | 07ad68bc156b3ab70401723bb074a29588ad3cb7 (patch) | |
| tree | fcd5c35bb393920e46af6c9b643d0544e78b5ab8 /Minecraft.World/HangingEntity.cpp | |
| parent | 7bee4770df1540c2daf3121c0790332fb41e72dd (diff) | |
dynamic_pointer_cast -> std::dynamic_pointer_cast
Diffstat (limited to 'Minecraft.World/HangingEntity.cpp')
| -rw-r--r-- | Minecraft.World/HangingEntity.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/HangingEntity.cpp b/Minecraft.World/HangingEntity.cpp index fcf80e07..a938acbc 100644 --- a/Minecraft.World/HangingEntity.cpp +++ b/Minecraft.World/HangingEntity.cpp @@ -156,7 +156,7 @@ bool HangingEntity::survives() for (AUTO_VAR(it, entities->begin()); it != itEnd; it++) { std::shared_ptr<Entity> e = (*it); - if(dynamic_pointer_cast<HangingEntity>(e) != NULL) + if(std::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(dynamic_pointer_cast<Player>( source)), 0); + return hurt(DamageSource::playerAttack(std::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 (dynamic_pointer_cast<Player>(sourceEntity) != NULL && !dynamic_pointer_cast<Player>(sourceEntity)->isAllowedToHurtEntity(shared_from_this()) ) + if (std::dynamic_pointer_cast<Player>(sourceEntity) != NULL && !std::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 = dynamic_pointer_cast<Player>( e ); + player = std::dynamic_pointer_cast<Player>( e ); } if (player != NULL && player->abilities.instabuild) |
