aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Cow.cpp
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-16 21:44:26 -0500
committerGitHub <noreply@github.com>2026-03-16 21:44:26 -0500
commitce739f6045ec72127491286ea3f3f21e537c1b55 (patch)
treef33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.World/Cow.cpp
parent255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff)
parent5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/Cow.cpp')
-rw-r--r--Minecraft.World/Cow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/Cow.cpp b/Minecraft.World/Cow.cpp
index 05e70102..0b959fc1 100644
--- a/Minecraft.World/Cow.cpp
+++ b/Minecraft.World/Cow.cpp
@@ -72,7 +72,7 @@ void Cow::playStepSound(int xt, int yt, int zt, int t)
float Cow::getSoundVolume()
{
- return 0.4f;
+ return 1.f;
}
int Cow::getDeathLoot()
@@ -106,17 +106,17 @@ void Cow::dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel)
bool Cow::mobInteract(shared_ptr<Player> player)
{
shared_ptr<ItemInstance> item = player->inventory->getSelected();
- if (item != NULL && item->id == Item::bucket_empty->id && !player->abilities.instabuild)
+ if (item != nullptr && item->id == Item::bucket_empty->id && !player->abilities.instabuild)
{
player->awardStat(GenericStats::cowsMilked(),GenericStats::param_cowsMilked());
if (item->count-- == 0)
{
- player->inventory->setItem(player->inventory->selected, shared_ptr<ItemInstance>( new ItemInstance(Item::bucket_milk) ) );
+ player->inventory->setItem(player->inventory->selected, std::make_shared<ItemInstance>(Item::bucket_milk));
}
- else if (!player->inventory->add(shared_ptr<ItemInstance>( new ItemInstance(Item::bucket_milk) )))
+ else if (!player->inventory->add(std::make_shared<ItemInstance>(Item::bucket_milk)))
{
- player->drop(shared_ptr<ItemInstance>( new ItemInstance(Item::bucket_milk) ));
+ player->drop(std::make_shared<ItemInstance>(Item::bucket_milk));
}
return true;
@@ -129,7 +129,7 @@ shared_ptr<AgableMob> Cow::getBreedOffspring(shared_ptr<AgableMob> target)
// 4J - added limit to number of animals that can be bred
if( level->canCreateMore( GetType(), Level::eSpawnType_Breed) )
{
- return shared_ptr<Cow>( new Cow(level) );
+ return std::make_shared<Cow>(level);
}
else
{