Thread: IsVisible

Results 1 to 2 of 2
  1. #1
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,520
    Reputation
    13
    Thanks
    1,494
    My Mood
    Asleep

    IsVisible

    Code:
    struct TraceSettings_t{
       int  Mask;
       vec3_t Mins;
       int  MaxEntitieNum;
       int  MinEntitieNum;
       vec3_t Maxs;
       bool   Solid;
    };
    
    void (*CG_Trace)(Trace* Trace, vec3_t Start, vec3_t End, int skipNumber, int mask, int a6, int a7) = (void (__cdecl *)(Trace* , vec3_t , vec3_t , int , int , int , int ))0x005FBBF0;
    
    void (*Set_Weapon_CL_Trace)(Trace* Trace, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int skipNumber, int mas, TraceSettings_t* TraceSettings ) = (void (__cdecl *)(Trace* Trace,const vec3_t, const vec3_t, const vec3_t, const vec3_t,  int, int,TraceSettings_t*  ))0x6AA910;
    
    void (*Set_CL_Trace)(Trace* Trace, const vec3_t start, const vec3_t end, const vec3_t maxs, const vec3_t mins, int mask, TraceSettings_t* TraceSettings ) = (void (__cdecl *)(Trace* ,const vec3_t, const vec3_t, const vec3_t, const vec3_t,  int, TraceSettings_t*   ))0x56B420;
    
    void (*Set_Small_CL_Trace)(Trace* Trace, const vec3_t start, const vec3_t end, TraceSettings_t* TraceSettings ) = (void (__cdecl *)(Trace* ,const vec3_t, const vec3_t, TraceSettings_t*    ))0x5BB300;
    Code:
    Trace* CTrace;
    TraceSettings_t* TraceSettings;
    
    bool CMisc::isVisible ( Entity* cent,vec3_t Start, vec3_t End )
    {
        if( !CTrace ) 
        { 
            CTrace = new Trace; ZeroMemory( CTrace, sizeof( Trace ) ); 
        }
        if( !TraceSettings ) 
        { 
            TraceSettings = new TraceSettings_t; ZeroMemory( TraceSettings, sizeof( TraceSettings_t ) ); 
        }
    
        if(CG_EspIsVisible(0, cent ) )
        {
            return true;
        }
        else
        {
            if (hookValue[VAR_SIMPLETRACE])
            {
                if( CEngineMisc.GetEntities[cg->ClientNum].UsingVehicle== 16 )
                {
                    CG_Trace    ( CTrace, cg->Refdef.LocalPos, End, cg->ClientNum, 0x803003, 0, 0 );
                    
                    return         CTrace->fraction == 1.00;
                }
                else
                {
                    TraceSettings->Mask = 80;
                    
                    Set_Small_CL_Trace( CTrace, Start, End, TraceSettings );
                
                    return        CTrace->fraction >= 1.00;
                }    
            }
            else
            {
                CG_Trace    ( CTrace, cg->Refdef.LocalPos, End, cg->ClientNum, 0x803003, 0, 0 );
                return        CTrace->fraction == 1.00;
            }
            
        } 
        return        false;
    }
    a bit has been removed but im sure you can do auto wall/aimtruhwalls with it

    credits:tamimego
    I Am on this site for the mods for mw2 ONLY. Not hacks.

  2. #2
    gdawg33's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    My Mood
    Sneaky
    Cool now we only need someone to add all the bits and pieces you have released in a release.