mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
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;
|
||||||
@ -83,17 +83,15 @@ void Client_Damage(void* mValue){
|
|||||||
}
|
}
|
||||||
|
|
||||||
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