Fix tfcstats_rankbots not working as expected when disabled (bug 3192, r=Nextra)

Former-commit-id: 2ed695c8bb
This commit is contained in:
Vincent Herbet 2013-08-07 16:44:25 +02:00
parent 7e11cb5cc1
commit dca0bbcbb1
2 changed files with 4 additions and 2 deletions

View File

@ -106,7 +106,7 @@ void CPlayer::PutInServer(){
ingame = true; ingame = true;
if ( ignoreBots(pEdict) ) if ((int)tfcstats_rankbots->value == 0 && IsBot()) // ignoreBots() can't be used as bot's flags are not set yet.
return; return;
restartStats(); restartStats();

View File

@ -48,7 +48,9 @@ traceVault traceData[] = {
{ "tf_weapon_concussiongrenade","co", TFC_WPN_CONCUSSIONGRENADE, ACT_NADE_NONE, 0.0 , 10 , 2 }, { "tf_weapon_concussiongrenade","co", TFC_WPN_CONCUSSIONGRENADE, ACT_NADE_NONE, 0.0 , 10 , 2 },
}; };
bool ignoreBots (edict_t *pEnt, edict_t *pOther){ bool ignoreBots (edict_t *pEnt, edict_t *pOther)
{
rankBots = (int)tfcstats_rankbots->value ? true : false;
if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) ) if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) )
return true; return true;
return false; return false;