From 7ae0c13854d94ac2153cd3bb05ce18044b7cf8bb Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:36:56 +0700 Subject: Revert "dynamic_pointer_cast -> std::dynamic_pointer_cast" This reverts commit 07ad68bc156b3ab70401723bb074a29588ad3cb7. --- Minecraft.World/Arrow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.World/Arrow.cpp') 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, std::shared_ptr target _init(); this->owner = mob; - if ( std::dynamic_pointer_cast( mob ) != NULL) pickup = PICKUP_ALLOWED; + if ( dynamic_pointer_cast( mob ) != NULL) pickup = PICKUP_ALLOWED; y = mob->y + mob->getHeadHeight() - 0.1f; @@ -94,7 +94,7 @@ Arrow::Arrow(Level *level, std::shared_ptr mob, float power) : Entity( leve _init(); this->owner = mob; - if ( std::dynamic_pointer_cast( mob ) != NULL) pickup = PICKUP_ALLOWED; + if ( dynamic_pointer_cast( 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(shared_from_this()), shared_from_this()); + damageSource = DamageSource::arrow(dynamic_pointer_cast(shared_from_this()), shared_from_this()); } else { - damageSource = DamageSource::arrow(std::dynamic_pointer_cast(shared_from_this()), owner); + damageSource = DamageSource::arrow(dynamic_pointer_cast(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 = std::dynamic_pointer_cast(res->entity); + std::shared_ptr mob = dynamic_pointer_cast(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(owner) != NULL ) && // arrow owner is a player + if ( (dynamic_pointer_cast(owner) != NULL ) && // arrow owner is a player ( res->entity->isAlive() == false ) && // target is now dead - ( std::dynamic_pointer_cast( res->entity ) != NULL ) ) // target is a creeper + ( dynamic_pointer_cast( res->entity ) != NULL ) ) // target is a creeper { - std::dynamic_pointer_cast(owner)->awardStat( + dynamic_pointer_cast(owner)->awardStat( GenericStats::arrowKillCreeper(), GenericStats::param_arrowKillCreeper() ); -- cgit v1.2.3