diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
| commit | 7074f35e4ba831e358117842b99ee35b87f85ae5 (patch) | |
| tree | 7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/FallingTile.cpp | |
| parent | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff) | |
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.
Diffstat (limited to 'Minecraft.World/FallingTile.cpp')
| -rw-r--r-- | Minecraft.World/FallingTile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Minecraft.World/FallingTile.cpp b/Minecraft.World/FallingTile.cpp index 254631ff..e7cf8f0e 100644 --- a/Minecraft.World/FallingTile.cpp +++ b/Minecraft.World/FallingTile.cpp @@ -19,7 +19,7 @@ void FallingTile::_init() data = 0; time = 0; dropItem = true; - + cancelDrop = false; hurtEntities = false; fallDamageMax = 40; @@ -134,7 +134,7 @@ void FallingTile::tick() } else { - if(dropItem && !cancelDrop) spawnAtLocation( shared_ptr<ItemInstance>(new ItemInstance(tile, 1, Tile::tiles[tile]->getSpawnResourcesAuxValue(data))), 0); + if(dropItem && !cancelDrop) spawnAtLocation( std::shared_ptr<ItemInstance>(new ItemInstance(tile, 1, Tile::tiles[tile]->getSpawnResourcesAuxValue(data))), 0); } } } @@ -153,7 +153,7 @@ void FallingTile::causeFallDamage(float distance) int dmg = Mth::ceil(distance - 1); if (dmg > 0) { - vector<shared_ptr<Entity> > *entities = level->getEntities(shared_from_this(), bb); + vector<std::shared_ptr<Entity> > *entities = level->getEntities(shared_from_this(), bb); DamageSource *source = tile == Tile::anvil_Id ? DamageSource::anvil : DamageSource::fallingBlock; //for (Entity entity : entities) |
