1
0

Moved GAMEMODE declaration to a single place... cPacket.h. Player can't take damage any more but can still sometimes die on spawn. Not sure why. Falling through the void does not kill you yet.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@17 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
admin@omencraft.com
2011-10-26 19:13:49 +00:00
parent 7b00d28157
commit 6062002d17
3 changed files with 9 additions and 8 deletions

View File

@@ -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;
}
}