Well Valve checks block it from working outside of friendlyfire *anyway*, so that detour (as is) just enables the flamethrower whenever mp_friendlyfire is on. Otherwise Valve's later check (done by the CTFFlamethrower itself) disables it ...
If you're worried you could always do what I'm doing, and check against an enable cvar (or even check the detour status against mp_friendlyfire):
PHP Code:
// Somewhere up the top, nicely, to declare it
ConVar *cv_FF;
// Within the SDK_OnLoad function
cv_FF = g_pCVar->FindVar("mp_friendlyfire");
// Within the detour
if(cv_FF->GetBool())
{
/* rest of the detour code */
}
else
{
return TeamCollision;
}
Or you could just destroy the detour every time cv_FF changes...
PHP Code:
// Declare this somewhere
static void FFCallback( IConVar *var, const char *pOldValue, float flOldValue )
{
if(cv_FF->GetBool())
{
uradetour->EnableDetour();
}
else
{
uradetour->DisableDetour();
}
}
// within OnLoad, after cv_FF is "found"
cv_FF->InstallChangeCallback(FFCallBack);
* shrugs *