summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemBow.h8
-rw-r--r--src/Items/ItemEmptyMap.h2
-rw-r--r--src/Items/ItemHandler.cpp4
-rw-r--r--src/Items/ItemItemFrame.h2
-rw-r--r--src/Items/ItemMap.h2
-rw-r--r--src/Items/ItemMinecart.h2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h
index f29cc5d59..cf2fe9ad2 100644
--- a/src/Items/ItemBow.h
+++ b/src/Items/ItemBow.h
@@ -29,7 +29,7 @@ public:
virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override
{
- ASSERT(a_Player != NULL);
+ ASSERT(a_Player != nullptr);
// Check if the player has an arrow in the inventory, or is in Creative:
if (!(a_Player->IsGameModeCreative() || a_Player->GetInventory().HasItems(cItem(E_ITEM_ARROW))))
@@ -45,7 +45,7 @@ public:
virtual void OnItemShoot(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
{
// Actual shot - produce the arrow with speed based on the ticks that the bow was charged
- ASSERT(a_Player != NULL);
+ ASSERT(a_Player != nullptr);
int BowCharge = a_Player->FinishChargingBow();
double Force = (double)BowCharge / 20.0;
@@ -65,14 +65,14 @@ public:
// Create the arrow entity:
cArrowEntity * Arrow = new cArrowEntity(*a_Player, Force * 2);
- if (Arrow == NULL)
+ if (Arrow == nullptr)
{
return;
}
if (!Arrow->Initialize(*a_Player->GetWorld()))
{
delete Arrow;
- Arrow = NULL;
+ Arrow = nullptr;
return;
}
a_Player->GetWorld()->BroadcastSoundEffect("random.bow", a_Player->GetPosX(), a_Player->GetPosY(), a_Player->GetPosZ(), 0.5, (float)Force);
diff --git a/src/Items/ItemEmptyMap.h b/src/Items/ItemEmptyMap.h
index 953673382..9238d771b 100644
--- a/src/Items/ItemEmptyMap.h
+++ b/src/Items/ItemEmptyMap.h
@@ -50,7 +50,7 @@ public:
return true;
}
- if (NewMap == NULL)
+ if (NewMap == nullptr)
{
return true;
}
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 912dde022..d1588e9d8 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -83,7 +83,7 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType)
memset(m_ItemHandler, 0, sizeof(m_ItemHandler));
m_HandlerInitialized = true;
}
- if (m_ItemHandler[a_ItemType] == NULL)
+ if (m_ItemHandler[a_ItemType] == nullptr)
{
m_ItemHandler[a_ItemType] = CreateItemHandler(a_ItemType);
}
@@ -278,7 +278,7 @@ void cItemHandler::Deinit()
for (int i = 0; i < 2267; i++)
{
delete m_ItemHandler[i];
- m_ItemHandler[i] = NULL;
+ m_ItemHandler[i] = nullptr;
}
memset(m_ItemHandler, 0, sizeof(m_ItemHandler)); // Don't leave any dangling pointers around, just in case
m_HandlerInitialized = false;
diff --git a/src/Items/ItemItemFrame.h b/src/Items/ItemItemFrame.h
index 87e20ecf0..5d22c1cb8 100644
--- a/src/Items/ItemItemFrame.h
+++ b/src/Items/ItemItemFrame.h
@@ -37,7 +37,7 @@ public:
if (!ItemFrame->Initialize(*a_World))
{
delete ItemFrame;
- ItemFrame = NULL;
+ ItemFrame = nullptr;
return false;
}
diff --git a/src/Items/ItemMap.h b/src/Items/ItemMap.h
index 056fe0fe7..2dbbb3dc0 100644
--- a/src/Items/ItemMap.h
+++ b/src/Items/ItemMap.h
@@ -31,7 +31,7 @@ public:
{
cMap * Map = a_World->GetMapManager().GetMapData((unsigned)a_Item.m_ItemDamage);
- if (Map == NULL)
+ if (Map == nullptr)
{
return;
}
diff --git a/src/Items/ItemMinecart.h b/src/Items/ItemMinecart.h
index 63038de51..ed0a4711c 100644
--- a/src/Items/ItemMinecart.h
+++ b/src/Items/ItemMinecart.h
@@ -56,7 +56,7 @@ public:
double x = (double)a_BlockX + 0.5;
double y = (double)a_BlockY + 0.5;
double z = (double)a_BlockZ + 0.5;
- cMinecart * Minecart = NULL;
+ cMinecart * Minecart = nullptr;
switch (m_ItemType)
{
case E_ITEM_MINECART: Minecart = new cRideableMinecart (x, y, z, cItem(), 1); break;