damage message changes
This commit is contained in:
parent
c4727c1dc3
commit
2baf9c4c20
|
@ -7,13 +7,15 @@ int damage;
|
|||
int TA;
|
||||
int weapon;
|
||||
int aim;
|
||||
bool ignore;
|
||||
CPlayer *pAttacker;
|
||||
|
||||
|
||||
void Client_ResetHUD(void* mValue){
|
||||
if ( mPlayer )
|
||||
if ( mPlayer ){
|
||||
mPlayer->clearStats = gpGlobals->time + 0.25f;
|
||||
}
|
||||
}
|
||||
|
||||
void Client_WeaponList(void* mValue){
|
||||
static int wpnList;
|
||||
|
@ -50,18 +52,25 @@ void Client_Damage(void* mValue){
|
|||
static int bits;
|
||||
switch (mState++) {
|
||||
case 1:
|
||||
ignore = false;
|
||||
damage = *(int*)mValue;
|
||||
break;
|
||||
case 2:
|
||||
bits = *(int*)mValue;
|
||||
break;
|
||||
case 3:
|
||||
if (!mPlayer || !damage || !*(float*)mValue || bits) break;
|
||||
if (!mPlayer || !damage || !*(float*)mValue || bits) {
|
||||
ignore = true;
|
||||
break;
|
||||
}
|
||||
edict_t *enemy;
|
||||
enemy = mPlayer->pEdict->v.dmg_inflictor;
|
||||
|
||||
if ( FNullEnt( enemy ) )
|
||||
if ( FNullEnt( enemy ) ){
|
||||
ignore = true;
|
||||
break;
|
||||
}
|
||||
|
||||
aim = 0;
|
||||
weapon = 0;
|
||||
pAttacker = NULL;
|
||||
|
@ -81,7 +90,7 @@ void Client_Damage(void* mValue){
|
|||
}
|
||||
|
||||
void Client_Damage_End(void* mValue){
|
||||
if ( !mPlayer || !damage )
|
||||
if ( ignore )
|
||||
return;
|
||||
|
||||
if ( !pAttacker ) pAttacker = mPlayer;
|
||||
|
@ -204,3 +213,4 @@ void Client_BarTime(void* mValue){
|
|||
g_bombAnnounce = BOMB_DEFUSING;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user