mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Fix incomplete implementation of csstats_pause cvar (bug 5755, r=joropito)
This commit is contained in:
parent
9624a8022d
commit
4766f84864
@ -132,7 +132,10 @@ void CPlayer::Init( int pi, edict_t* pe )
|
|||||||
rank = 0;
|
rank = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::saveKill(CPlayer* pVictim, int wweapon, int hhs, int ttk){
|
void CPlayer::saveKill(CPlayer* pVictim, int wweapon, int hhs, int ttk)
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( ignoreBots(pEdict,pVictim->pEdict) )
|
if ( ignoreBots(pEdict,pVictim->pEdict) )
|
||||||
return;
|
return;
|
||||||
@ -186,7 +189,10 @@ void CPlayer::saveKill(CPlayer* pVictim, int wweapon, int hhs, int ttk){
|
|||||||
life.tks += ttk;
|
life.tks += ttk;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody){
|
void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody)
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( ignoreBots(pEdict,pVictim->pEdict) )
|
if ( ignoreBots(pEdict,pVictim->pEdict) )
|
||||||
return;
|
return;
|
||||||
@ -229,7 +235,10 @@ void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CPlayer::saveShot(int weapon){
|
void CPlayer::saveShot(int weapon)
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( ignoreBots(pEdict) )
|
if ( ignoreBots(pEdict) )
|
||||||
return;
|
return;
|
||||||
@ -243,19 +252,35 @@ void CPlayer::saveShot(int weapon){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CPlayer::saveBPlant(){
|
void CPlayer::saveBPlant()
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
life.bPlants++;
|
life.bPlants++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::saveBExplode(){
|
void CPlayer::saveBExplode()
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
life.bExplosions++;
|
life.bExplosions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::saveBDefusing(){
|
void CPlayer::saveBDefusing()
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
life.bDefusions++;
|
life.bDefusions++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::saveBDefused(){
|
void CPlayer::saveBDefused()
|
||||||
|
{
|
||||||
|
if ( !isModuleActive() )
|
||||||
|
return;
|
||||||
|
|
||||||
life.bDefused++;
|
life.bDefused++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +298,7 @@ bool ignoreBots(edict_t *pEnt, edict_t *pOther)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isModuleActive(){
|
bool isModuleActive(){
|
||||||
if ( !(int)CVAR_GET_FLOAT("csstats_pause") )
|
if ( !(int)csstats_pause->value )
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user