Revert "shared_ptr -> std::shared_ptr"

This reverts commit 7074f35e4b.
This commit is contained in:
void_17
2026-03-02 17:37:16 +07:00
parent 8a2a62ea1d
commit 119bff3514
1373 changed files with 12049 additions and 12049 deletions

View File

@@ -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();
}