shared_ptr -> std::shared_ptr

This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -74,14 +74,14 @@ void FarmTile::tick(Level *level, int x, int y, int z, Random *random)
}
}
void FarmTile::fallOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity, float fallDistance)
void FarmTile::fallOn(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity, float fallDistance)
{
// 4J Stu - Fix for #86148 - Code: Gameplay: Jumping on Farmland does not always result in turning to Dirt Block
// We should not be setting tiles on the client based on random values!
if (!level->isClientSide && level->random->nextFloat() < (fallDistance - .5f))
{
// Fix for #60547 - TU7: Content: Gameplay: Players joining a game can destroy crops even with Trust Players option disabled.
shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
std::shared_ptr<Player> player = dynamic_pointer_cast<Player>(entity);
if(player == NULL || player->isAllowedToMine()) level->setTile(x, y, z, Tile::dirt_Id);
}
}