diff options
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r-- | source/ClientHandle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index f67a546fd..ea8b48f9d 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -469,12 +469,12 @@ bool cClientHandle::HandleLogin(int a_ProtocolVersion, const AString & a_Usernam void cClientHandle::HandleCreativeInventory(short a_SlotNum, const cItem & a_HeldItem) { // This is for creative Inventory changes - if (m_Player->GetGameMode() != eGameMode_Creative) + if (!m_Player->IsGameModeCreative()) { LOGWARNING("Got a CreativeInventoryAction packet from user \"%s\" while not in creative mode. Ignoring.", m_Username.c_str()); return; } - if (m_Player->GetWindow()->GetWindowType() != cWindow::Inventory) + if (m_Player->GetWindow()->GetWindowType() != cWindow::wtInventory) { LOGWARNING("Got a CreativeInventoryAction packet from user \"%s\" while not in the inventory window. Ignoring.", m_Username.c_str()); return; @@ -650,7 +650,7 @@ void cClientHandle::HandleBlockDigStarted(int a_BlockX, int a_BlockY, int a_Bloc m_LastDigBlockZ = a_BlockZ; if ( - (m_Player->GetGameMode() == eGameMode_Creative) || // In creative mode, digging is done immediately + (m_Player->IsGameModeCreative()) || // In creative mode, digging is done immediately g_BlockOneHitDig[a_OldBlock] // One-hit blocks get destroyed immediately, too ) { |