P47R!CK
07-26-2005, 01:33 PM
void __stdcall Hooked_ViewDrawFade( byte *color, IMaterial *pMaterial )
{
if ( pMaterial && gCvars.vis_flash.bGetValue() )
{
if( strcmp( pMaterial->GetName(), "effects/flashbang_white" ) == 0 ) // effects/flashbang_white 1 0.619608
{
int iPercentage = (int) (pMaterial->GetAlphaModulation() * 100.0f);
}
pMaterial->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
}
return gWorldRenderFuncs.ViewDrawFade( color, pMaterial );
}
iPercentage tells you the amount in percent.
Credits Siodine PizzaPan and Tetsuo.
{
if ( pMaterial && gCvars.vis_flash.bGetValue() )
{
if( strcmp( pMaterial->GetName(), "effects/flashbang_white" ) == 0 ) // effects/flashbang_white 1 0.619608
{
int iPercentage = (int) (pMaterial->GetAlphaModulation() * 100.0f);
}
pMaterial->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
}
return gWorldRenderFuncs.ViewDrawFade( color, pMaterial );
}
iPercentage tells you the amount in percent.
Credits Siodine PizzaPan and Tetsuo.