diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:36:56 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:36:56 +0700 |
| commit | 7ae0c13854d94ac2153cd3bb05ce18044b7cf8bb (patch) | |
| tree | 95006852217f8f113288ea34988ae91c001a5de6 /Minecraft.World/Arrow.cpp | |
| parent | 07ad68bc156b3ab70401723bb074a29588ad3cb7 (diff) | |
Revert "dynamic_pointer_cast -> std::dynamic_pointer_cast"
This reverts commit 07ad68bc156b3ab70401723bb074a29588ad3cb7.
Diffstat (limited to 'Minecraft.World/Arrow.cpp')
| -rw-r--r-- | Minecraft.World/Arrow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.World/Arrow.cpp b/Minecraft.World/Arrow.cpp index f599ab35..9edd2208 100644 --- a/Minecraft.World/Arrow.cpp +++ b/Minecraft.World/Arrow.cpp @@ -57,7 +57,7 @@ Arrow::Arrow(Level *level, std::shared_ptr<Mob> mob, std::shared_ptr<Mob> target _init(); this->owner = mob; - if ( std::dynamic_pointer_cast<Player>( mob ) != NULL) pickup = PICKUP_ALLOWED; + if ( dynamic_pointer_cast<Player>( mob ) != NULL) pickup = PICKUP_ALLOWED; y = mob->y + mob->getHeadHeight() - 0.1f; @@ -94,7 +94,7 @@ Arrow::Arrow(Level *level, std::shared_ptr<Mob> mob, float power) : Entity( leve _init(); this->owner = mob; - if ( std::dynamic_pointer_cast<Player>( mob ) != NULL) pickup = PICKUP_ALLOWED; + if ( dynamic_pointer_cast<Player>( mob ) != NULL) pickup = PICKUP_ALLOWED; setSize(0.5f, 0.5f); @@ -281,11 +281,11 @@ void Arrow::tick() DamageSource *damageSource = NULL; if (owner == NULL) { - damageSource = DamageSource::arrow(std::dynamic_pointer_cast<Arrow>(shared_from_this()), shared_from_this()); + damageSource = DamageSource::arrow(dynamic_pointer_cast<Arrow>(shared_from_this()), shared_from_this()); } else { - damageSource = DamageSource::arrow(std::dynamic_pointer_cast<Arrow>(shared_from_this()), owner); + damageSource = DamageSource::arrow(dynamic_pointer_cast<Arrow>(shared_from_this()), owner); } if(res->entity->hurt(damageSource, dmg)) @@ -299,7 +299,7 @@ void Arrow::tick() res->entity->setOnFire(5); } - std::shared_ptr<Mob> mob = std::dynamic_pointer_cast<Mob>(res->entity); + std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(res->entity); if (mob != NULL) { mob->arrowCount++; @@ -319,12 +319,12 @@ void Arrow::tick() } // 4J : WESTY : For award, need to track if creeper was killed by arrow from the player. - if ( (std::dynamic_pointer_cast<Player>(owner) != NULL ) && // arrow owner is a player + if ( (dynamic_pointer_cast<Player>(owner) != NULL ) && // arrow owner is a player ( res->entity->isAlive() == false ) && // target is now dead - ( std::dynamic_pointer_cast<Creeper>( res->entity ) != NULL ) ) // target is a creeper + ( dynamic_pointer_cast<Creeper>( res->entity ) != NULL ) ) // target is a creeper { - std::dynamic_pointer_cast<Player>(owner)->awardStat( + dynamic_pointer_cast<Player>(owner)->awardStat( GenericStats::arrowKillCreeper(), GenericStats::param_arrowKillCreeper() ); |
