summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.cpp
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-26 21:13:49 +0200
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-26 21:13:49 +0200
commit6062002d1753ebf8fab356f34a338cbe2c16c2fe (patch)
tree4c23a60cf2e2a65c8fd0bda44141197de022fa5b /source/cPlayer.cpp
parentCreative mode now breaks blocks without providing block drops. Need to work with Player's Inventory for proper creative mode support. GAMEMODE is declared and set twice. (diff)
downloadcuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.tar
cuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.tar.gz
cuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.tar.bz2
cuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.tar.lz
cuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.tar.xz
cuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.tar.zst
cuberite-6062002d1753ebf8fab356f34a338cbe2c16c2fe.zip
Diffstat (limited to 'source/cPlayer.cpp')
-rw-r--r--source/cPlayer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp
index 71fa41d27..21c08fc5a 100644
--- a/source/cPlayer.cpp
+++ b/source/cPlayer.cpp
@@ -317,11 +317,13 @@ void cPlayer::Heal( int a_Health )
void cPlayer::TakeDamage( int a_Damage, cEntity* a_Instigator )
{
- cPawn::TakeDamage( a_Damage, a_Instigator );
+ if ( !(cPacket::GAMEMODE == 1) ) {
+ cPawn::TakeDamage( a_Damage, a_Instigator );
- cPacket_UpdateHealth Health;
- Health.m_Health = m_Health;
- m_ClientHandle->Send( Health );
+ cPacket_UpdateHealth Health;
+ Health.m_Health = m_Health;
+ m_ClientHandle->Send( Health );
+ }
}
void cPlayer::KilledBy( cEntity* a_Killer )
@@ -711,4 +713,4 @@ void cPlayer::SetName( const char* a_Name )
const cPlayer::GroupList & cPlayer::GetGroups()
{
return m_pState->Groups;
-} \ No newline at end of file
+}