P47R!CK
02-26-2005, 04:10 PM
int __stdcall Hooked_DrawModel( int flags, IClientRenderable *cliententity, ModelInstanceHandle_t instance, int entity_index, const model_t *model, Vector const& origin, QAngle const& angles, int skin, int body, int hitboxset, const matrix3x4_t *modelToWorld, const matrix3x4_t *pLightingOffset )
{
_asm pushad;
const char* pszModelName = g_pModelinfo->GetModelName( model );
if (pszModelName && gCvars.wallhack->GetFloat() > 0.0f )
{
if (!strstr(pszModelName,"models/weapons/") && !strstr(pszModelName,"models/player/"))
{
gOrgRenderView.SetBlend( gCvars.wallhack->GetFloat() );
}
else
{
gOrgRenderView.SetBlend( 1.0f );
}
}
else
{
gOrgRenderView.SetBlend( 1.0f );
}
_asm popad;
return gModelRenderFuncs.DrawModel( flags, cliententity, instance, entity_index, model, origin, angles, skin, body, hitboxset, modelToWorld, pLightingOffset );
}
{
_asm pushad;
const char* pszModelName = g_pModelinfo->GetModelName( model );
if (pszModelName && gCvars.wallhack->GetFloat() > 0.0f )
{
if (!strstr(pszModelName,"models/weapons/") && !strstr(pszModelName,"models/player/"))
{
gOrgRenderView.SetBlend( gCvars.wallhack->GetFloat() );
}
else
{
gOrgRenderView.SetBlend( 1.0f );
}
}
else
{
gOrgRenderView.SetBlend( 1.0f );
}
_asm popad;
return gModelRenderFuncs.DrawModel( flags, cliententity, instance, entity_index, model, origin, angles, skin, body, hitboxset, modelToWorld, pLightingOffset );
}