diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:37:16 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:37:16 +0700 |
| commit | 119bff351450ea16ffda550b6e0f67379b29f708 (patch) | |
| tree | d9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/RestrictOpenDoorGoal.cpp | |
| parent | 8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff) | |
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/RestrictOpenDoorGoal.cpp')
| -rw-r--r-- | Minecraft.World/RestrictOpenDoorGoal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/RestrictOpenDoorGoal.cpp b/Minecraft.World/RestrictOpenDoorGoal.cpp index 2849aabc..e8620a71 100644 --- a/Minecraft.World/RestrictOpenDoorGoal.cpp +++ b/Minecraft.World/RestrictOpenDoorGoal.cpp @@ -13,9 +13,9 @@ RestrictOpenDoorGoal::RestrictOpenDoorGoal(PathfinderMob *mob) bool RestrictOpenDoorGoal::canUse() { if (mob->level->isDay()) return false; - std::shared_ptr<Village> village = mob->level->villages->getClosestVillage(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z), 16); + shared_ptr<Village> village = mob->level->villages->getClosestVillage(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z), 16); if (village == NULL) return false; - std::shared_ptr<DoorInfo> _doorInfo = village->getClosestDoorInfo(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z)); + shared_ptr<DoorInfo> _doorInfo = village->getClosestDoorInfo(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z)); if (_doorInfo == NULL) return false; doorInfo = _doorInfo; return _doorInfo->distanceToInsideSqr(Mth::floor(mob->x), Mth::floor(mob->y), Mth::floor(mob->z)) < 1.5 * 1.5; @@ -24,7 +24,7 @@ bool RestrictOpenDoorGoal::canUse() bool RestrictOpenDoorGoal::canContinueToUse() { if (mob->level->isDay()) return false; - std::shared_ptr<DoorInfo> _doorInfo = doorInfo.lock(); + shared_ptr<DoorInfo> _doorInfo = doorInfo.lock(); if ( _doorInfo == NULL ) return false; return !_doorInfo->removed && _doorInfo->isInsideSide(Mth::floor(mob->x), Mth::floor(mob->z)); } @@ -44,6 +44,6 @@ void RestrictOpenDoorGoal::stop() void RestrictOpenDoorGoal::tick() { - std::shared_ptr<DoorInfo> _doorInfo = doorInfo.lock(); + shared_ptr<DoorInfo> _doorInfo = doorInfo.lock(); if ( _doorInfo ) _doorInfo->incBookingCount(); }
\ No newline at end of file |
