small changes in damage event
This commit is contained in:
parent
1709408ea7
commit
9bed70c543
|
@ -6,7 +6,7 @@
|
||||||
weaponsVault weaponData[MAX_WEAPONS];
|
weaponsVault weaponData[MAX_WEAPONS];
|
||||||
|
|
||||||
int damage;
|
int damage;
|
||||||
int TA;
|
int TK;
|
||||||
int weapon;
|
int weapon;
|
||||||
int aim;
|
int aim;
|
||||||
CPlayer *pAttacker;
|
CPlayer *pAttacker;
|
||||||
|
@ -77,23 +77,21 @@ void Client_Damage(void* mValue){
|
||||||
pAttacker->saveHit( mPlayer , weapon , damage, aim);
|
pAttacker->saveHit( mPlayer , weapon , damage, aim);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( g_grenades.find(enemy , &pAttacker , &weapon ) )
|
if( g_grenades.find(enemy , &pAttacker , &weapon ) )
|
||||||
pAttacker->saveHit( mPlayer , weapon , damage, aim );
|
pAttacker->saveHit( mPlayer , weapon , damage, aim );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client_Damage_End(void* mValue){
|
void Client_Damage_End(void* mValue){
|
||||||
if ( !mPlayer || !damage )
|
if ( !mPlayer || !damage || mPlayer->IsAlive() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( !pAttacker ) pAttacker = mPlayer;
|
if ( !pAttacker )
|
||||||
TA = 0;
|
pAttacker = mPlayer;
|
||||||
|
TK = 0;
|
||||||
if ( (mPlayer->teamId == pAttacker->teamId) && (mPlayer != pAttacker) )
|
if ( (mPlayer->teamId == pAttacker->teamId) && (mPlayer != pAttacker) )
|
||||||
TA = 1;
|
TK = 1;
|
||||||
|
pAttacker->saveKill(mPlayer,weapon,( aim == 1 ) ? 1:0 ,TK);
|
||||||
if ( !mPlayer->IsAlive() ){
|
|
||||||
pAttacker->saveKill(mPlayer,weapon,( aim == 1 ) ? 1:0 ,TA);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client_CurWeapon(void* mValue){
|
void Client_CurWeapon(void* mValue){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user