if(cvar.thirdperson)
{
engfuncs.getcvarpointer("chase_active")->value = 1;
engfuncs.getcvarpointer("r_drawviewmodel")->value = 0;
engfuncs.getcvarpointer("chase_back")->value = cvar.chaseback;
engfuncs.getcvarpointer("chase_up")->value = cvar.chaseup;
engfuncs.getcvarpointer("chase_right")->value = cvar.chaseright;
}
And obviously enough...if(!cvar.thirdperson) then take chase active off and set drawviewmodel to 1.
Now to do the transparency..
Code:
void TransModel ( void )
{
if(cvar.thirdperson && cvar.transme)
{
cl_entity_t *me = gEngfuncs.GetLocalPlayer();
me->curstate.renderamt = cvar.transamt;
me->curstate.rendermode = krendertransadd;
}
}