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

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

View File

@ -106,7 +106,7 @@ void CPlayer::PutInServer(){
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;
restartStats();

View File

@ -48,7 +48,9 @@ traceVault traceData[] = {
{ "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 ) ) )
return true;
return false;