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