From f38375a2ecaca692f905d687101315b801c3e724 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 2 Nov 2013 16:01:40 +0000 Subject: [PATCH] Fixed bow damage in creative Also reverted indenting change --- source/Entities/Player.cpp | 2 +- source/Items/ItemBow.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp index ffd829663..2e4199629 100644 --- a/source/Entities/Player.cpp +++ b/source/Entities/Player.cpp @@ -318,7 +318,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround) (BlockType == E_BLOCK_STATIONARY_WATER) || (BlockType == E_BLOCK_LADDER) || (BlockType == E_BLOCK_VINES) - ) + ) { m_LastGroundHeight = (float)GetPosY(); } diff --git a/source/Items/ItemBow.h b/source/Items/ItemBow.h index 1add0dc6d..7bce127b1 100644 --- a/source/Items/ItemBow.h +++ b/source/Items/ItemBow.h @@ -71,7 +71,11 @@ public: return; } a_Player->GetWorld()->BroadcastSpawnEntity(*Arrow); - a_Player->UseEquippedItem(); + + if (!a_Player->IsGameModeCreative()) + { + a_Player->UseEquippedItem(); + } } } ;