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/Boat.cpp | |
| parent | 7bee4770df1540c2daf3121c0790332fb41e72dd (diff) | |
dynamic_pointer_cast -> std::dynamic_pointer_cast
Diffstat (limited to 'Minecraft.World/Boat.cpp')
| -rw-r--r-- | Minecraft.World/Boat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/Boat.cpp b/Minecraft.World/Boat.cpp index 26f02203..77062279 100644 --- a/Minecraft.World/Boat.cpp +++ b/Minecraft.World/Boat.cpp @@ -100,8 +100,8 @@ bool Boat::hurt(DamageSource *source, int hurtDamage) { std::shared_ptr<Entity> attacker = source->getDirectEntity(); - if (dynamic_pointer_cast<Player>(attacker) != NULL && - !dynamic_pointer_cast<Player>(attacker)->isAllowedToHurtEntity( shared_from_this() )) + if (std::dynamic_pointer_cast<Player>(attacker) != NULL && + !std::dynamic_pointer_cast<Player>(attacker)->isAllowedToHurtEntity( shared_from_this() )) return false; } @@ -117,7 +117,7 @@ bool Boat::hurt(DamageSource *source, int hurtDamage) markHurt(); // 4J Stu - Brought froward from 12w36 to fix #46611 - TU5: Gameplay: Minecarts and boat requires more hits than one to be destroyed in creative mode - std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(source->getEntity()); + std::shared_ptr<Player> player = std::dynamic_pointer_cast<Player>(source->getEntity()); if (player != NULL && player->abilities.instabuild) setDamage(100); if (getDamage() > 20 * 2) @@ -469,7 +469,7 @@ wstring Boat::getName() bool Boat::interact(std::shared_ptr<Player> player) { - if (rider.lock() != NULL && dynamic_pointer_cast<Player>(rider.lock())!=NULL && rider.lock() != player) return true; + if (rider.lock() != NULL && std::dynamic_pointer_cast<Player>(rider.lock())!=NULL && rider.lock() != player) return true; if (!level->isClientSide) { // 4J HEG - Fixed issue with player not being able to dismount boat (issue #4446) |
