is this how it works
Code:
// This should be called on weapon change, on new round, when the user selects a new skill, and after an item is purchased
ForwardAddToFullPack(ES,e,Ent,Host,HostFlags,Player,pSet)
{
// Do not want to set them as invisible if the player is currently rendering
if ( !p_data_b[ent][PB_CAN_RENDER] || !p_data_b[ent][PB_ISCONNECTED] )
{
return;
}
new iInvisLevel = 0;
static iSkillLevel;
iSkillLevel = SM_GetSkillLevel( ent, SKILL_INVISIBILITY );
// If they are Human Alliance with Invisibility lets set the level
if ( iSkillLevel > 0 )
{
iInvisLevel = p_invisibility[iSkillLevel-1];
}
// User has a Cloak of Invisibility
if ( ITEM_Has( ent, ITEM_CLOAK ) > ITEM_NONE )
{
// Then we are already a little invis, lets give them a little bonus for purchasing the item
if ( iInvisLevel > 0 )
{
iInvisLevel = floatround( float( iInvisLevel ) / INVIS_CLOAK_DIVISOR );
}
else
{
iInvisLevel = get_pcvar_num( CVAR_wc3_cloak );
}
}
// If the player is holding a knife they should be more invisible
if ( SHARED_IsHoldingKnife( ent ) )
{
iInvisLevel /= 2;
}
if ( iInvisLevel )
{
if(p_data_b[ent][PB_INVIS] && ITEM_Has(player,ITEM_GOGGLES) == ITEM_NONE)
{
set_es(ES,ES_Solid,SOLID_NOT)
set_es(ES,ES_RenderMode,kRenderTransAlpha)
set_es(ES,ES_RenderAmt,iInvisLevel)
}
p_data_b[ent][PB_INVIS] = true;
}
// User should not be invisible
else
{
set_user_rendering( ent );
p_data_b[ent][PB_INVIS] = false;
}
return;
}
think you can tell me what
ES
e
Ent
Host
HostFlags
Player
pSet
are