summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Minecart.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index f45e7bb69..22e046800 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -36,7 +36,7 @@ public:
virtual bool Item(cEntity * a_Entity) override
{
- ASSERT(a_Entity != NULL);
+ ASSERT(a_Entity != nullptr);
if (!a_Entity->IsPlayer() && !a_Entity->IsMob() && !a_Entity->IsMinecart() && !a_Entity->IsBoat())
{
@@ -130,7 +130,7 @@ void cMinecart::HandlePhysics(float a_Dt, cChunk & a_Chunk)
int RelPosX = POSX_TOINT - a_Chunk.GetPosX() * cChunkDef::Width;
int RelPosZ = POSZ_TOINT - a_Chunk.GetPosZ() * cChunkDef::Width;
cChunk * Chunk = a_Chunk.GetRelNeighborChunkAdjustCoords(RelPosX, RelPosZ);
- if (Chunk == NULL)
+ if (Chunk == nullptr)
{
// Inside an unloaded chunk, bail out all processing
return;
@@ -806,7 +806,7 @@ bool cMinecart::TestBlockCollision(NIBBLETYPE a_RailMeta)
bool cMinecart::TestEntityCollision(NIBBLETYPE a_RailMeta)
{
- cMinecartCollisionCallback MinecartCollisionCallback(GetPosition(), GetHeight(), GetWidth(), GetUniqueID(), ((m_Attachee == NULL) ? -1 : m_Attachee->GetUniqueID()));
+ cMinecartCollisionCallback MinecartCollisionCallback(GetPosition(), GetHeight(), GetWidth(), GetUniqueID(), ((m_Attachee == nullptr) ? -1 : m_Attachee->GetUniqueID()));
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(POSX_TOINT, POSZ_TOINT, ChunkX, ChunkZ);
m_World->ForEachEntityInChunk(ChunkX, ChunkZ, MinecartCollisionCallback);
@@ -980,7 +980,7 @@ bool cMinecart::TestEntityCollision(NIBBLETYPE a_RailMeta)
bool cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
{
- if ((TDI.Attacker != NULL) && TDI.Attacker->IsPlayer() && ((cPlayer *)TDI.Attacker)->IsGameModeCreative())
+ if ((TDI.Attacker != nullptr) && TDI.Attacker->IsPlayer() && ((cPlayer *)TDI.Attacker)->IsGameModeCreative())
{
Destroy();
TDI.FinalDamage = GetMaxHealth(); // Instant hit for creative
@@ -1074,7 +1074,7 @@ void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
{
super::OnRightClicked(a_Player);
- if (m_Attachee != NULL)
+ if (m_Attachee != nullptr)
{
if (m_Attachee->GetUniqueID() == a_Player.GetUniqueID())
{
@@ -1120,14 +1120,14 @@ void cMinecartWithChest::OnRightClicked(cPlayer & a_Player)
{
// If the window is not created, open it anew:
cWindow * Window = GetWindow();
- if (Window == NULL)
+ if (Window == nullptr)
{
OpenNewWindow();
Window = GetWindow();
}
// Open the window for the player:
- if (Window != NULL)
+ if (Window != nullptr)
{
if (a_Player.GetWindow() != Window)
{