From 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b Mon Sep 17 00:00:00 2001 From: void_17 <61356189+void2012@users.noreply.github.com> Date: Fri, 6 Mar 2026 02:11:18 +0700 Subject: Remove AUTO_VAR macro and _toString function (#592) --- Minecraft.World/EntityHorse.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Minecraft.World/EntityHorse.cpp') diff --git a/Minecraft.World/EntityHorse.cpp b/Minecraft.World/EntityHorse.cpp index d7250087..90c2a6b9 100644 --- a/Minecraft.World/EntityHorse.cpp +++ b/Minecraft.World/EntityHorse.cpp @@ -440,7 +440,7 @@ void EntityHorse::causeFallDamage(float fallDistance) /** * Different inventory sizes depending on the kind of horse -* +* * @return */ int EntityHorse::getInventorySize() @@ -523,9 +523,8 @@ shared_ptr EntityHorse::getClosestMommy(shared_ptr baby, do shared_ptr mommy = nullptr; vector > *list = level->getEntities(baby, baby->bb->expand(searchRadius, searchRadius, searchRadius), PARENT_HORSE_SELECTOR); - for(AUTO_VAR(it,list->begin()); it != list->end(); ++it) + for( auto& horse : *list ) { - shared_ptr horse = *it; double distanceSquared = horse->distanceToSqr(baby->x, baby->y, baby->z); if (distanceSquared < closestDistance) @@ -767,7 +766,7 @@ void EntityHorse::rebuildLayeredTextureInfo() else { layerTextureLayers[0] = -1; - layerTextureHashName += L"_" + _toString(type) + L"_"; + layerTextureHashName += L"_" + std::to_wstring(type) + L"_"; armorIndex = 1; } @@ -1036,7 +1035,7 @@ bool EntityHorse::canWearArmor() /** * able to carry bags -* +* * @return */ bool EntityHorse::canWearBags() @@ -1065,7 +1064,7 @@ bool EntityHorse::isPureBreed() /** * Is this an Undead Horse? -* +* * @return */ bool EntityHorse::isUndead() @@ -1675,7 +1674,7 @@ MobGroupData *EntityHorse::finalizeMobSpawn(MobGroupData *groupData, int extraDa setAge(AgableMob::BABY_START_AGE); } - if (type == TYPE_SKELETON || type == TYPE_UNDEAD) + if (type == TYPE_SKELETON || type == TYPE_UNDEAD) { getAttribute(SharedMonsterAttributes::MAX_HEALTH)->setBaseValue(15); getAttribute(SharedMonsterAttributes::MOVEMENT_SPEED)->setBaseValue(0.2f); @@ -1791,7 +1790,7 @@ void EntityHorse::positionRider() float height = .15f * standAnimO; rider.lock()->setPos(x + dist * sin, y + getRideHeight() + rider.lock()->getRidingHeight() + height, z - dist * cos); - + if ( rider.lock()->instanceof(eTYPE_LIVINGENTITY) ) { shared_ptr livingRider = dynamic_pointer_cast(rider.lock()); -- cgit v1.2.3