Fix tfcstats_pause imcomplete implementation (bug 5836, r=Nextra)
Former-commit-id: ea7b0f56fd2ea2f8d59d5b30172d8d9bfe4079f9
This commit is contained in:
parent
dca0bbcbb1
commit
225494b559
|
@ -161,7 +161,10 @@ void CPlayer::Init( int pi, edict_t* pe )
|
||||||
bot = false;
|
bot = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
@ -218,7 +221,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;
|
||||||
|
@ -264,7 +270,10 @@ void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody){
|
||||||
life.bodyHits[bbody]++;
|
life.bodyHits[bbody]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::saveShot(int weapon){
|
void CPlayer::saveShot(int weapon)
|
||||||
|
{
|
||||||
|
if (!isModuleActive())
|
||||||
|
return;
|
||||||
|
|
||||||
//PRINT_CONSOLE("Shot! Weapon:%d\n",weapon);
|
//PRINT_CONSOLE("Shot! Weapon:%d\n",weapon);
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ bool ignoreBots (edict_t *pEnt, edict_t *pOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isModuleActive(){
|
bool isModuleActive(){
|
||||||
if ( !(int)CVAR_GET_FLOAT("tfcstats_pause") )
|
if (!(int)tfcstats_pause->value)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ void ServerActivate_Post( edict_t *pEdictList, int edictCount, int clientMax ){
|
||||||
void PlayerPreThink_Post( edict_t *pEntity ) {
|
void PlayerPreThink_Post( edict_t *pEntity ) {
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
|
||||||
if (!isModuleActive()) // stats only
|
if (!isModuleActive()) // stats only
|
||||||
return;
|
RETURN_META(MRES_IGNORED);
|
||||||
|
|
||||||
if (pPlayer->clearStats && pPlayer->clearStats < gpGlobals->time && pPlayer->ingame){
|
if (pPlayer->clearStats && pPlayer->clearStats < gpGlobals->time && pPlayer->ingame){
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user