aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/LeashItem.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/LeashItem.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.World/LeashItem.cpp')
-rw-r--r--Minecraft.World/LeashItem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/LeashItem.cpp b/Minecraft.World/LeashItem.cpp
index 4de74a5c..ddb7878b 100644
--- a/Minecraft.World/LeashItem.cpp
+++ b/Minecraft.World/LeashItem.cpp
@@ -12,7 +12,7 @@ LeashItem::LeashItem(int id) : Item(id)
bool LeashItem::useOn(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly)
{
int tile = level->getTile(x, y, z);
- if (Tile::tiles[tile] != nullptr && Tile::tiles[tile]->getRenderShape() == Tile::SHAPE_FENCE)
+ if (Tile::tiles[tile] != NULL && Tile::tiles[tile]->getRenderShape() == Tile::SHAPE_FENCE)
{
if (bTestUseOnOnly) return bindPlayerMobsTest(player, level, x,y,z);
@@ -36,14 +36,14 @@ bool LeashItem::bindPlayerMobs(shared_ptr<Player> player, Level *level, int x, i
bool foundMobs = false;
double range = 7;
vector<shared_ptr<Entity> > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range));
- if (mobs != nullptr)
+ if (mobs != NULL)
{
for(auto& it : *mobs)
{
shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(it);
if (mob->isLeashed() && mob->getLeashHolder() == player)
{
- if (activeKnot == nullptr)
+ if (activeKnot == NULL)
{
activeKnot = LeashFenceKnotEntity::createAndAddKnot(level, x, y, z);
}
@@ -62,7 +62,7 @@ bool LeashItem::bindPlayerMobsTest(shared_ptr<Player> player, Level *level, int
double range = 7;
vector<shared_ptr<Entity> > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range));
- if (mobs != nullptr)
+ if (mobs != NULL)
{
for(auto& it : *mobs)
{