Thread: [HELP] why...

Results 1 to 5 of 5
  1. #1
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    127

    [HELP] why...

    Code:
    bool __cdecl cEngine::IsVisible( D3DXVECTOR3 Point )
    {
    	IntersectQuery iQuery;
    	IntersectInfo iInfo;
    
    	memset( &iQuery, 0, sizeof(iQuery) );
    
    	iQuery.Start  = esp->local.CameraPos; 
    	iQuery.End    = Point;
    
    	return !engine->GetLTBase()->IntersectSegment( iQuery, &iInfo );
    }
    1. Why would you set iQuery to 0 by memset if it already is 0 because it hasnt been given a value?
    2. What does the __cdecl mean when the function is declared?

  2. #2
    Alessandro10's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MPGH.NET
    Posts
    6,140
    Reputation
    215
    Thanks
    4,607
    My Mood
    Busy
    Lulz Gellin Vip Base

  3. #3
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    I think there are a few default values or something for IntersectQuery you need to clear.

  4. The Following User Says Thank You to Crash For This Useful Post:

    kibbles18 (03-30-2011)

  5. #4
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    653
    Reputation
    70
    Thanks
    1,157
    My Mood
    Bitchy
    Because
    1. No, it's set to random garbage from the stack in non-debug builds.
    2. __cdecl is the calling convention. Just has to do with how parameters are passed.

  6. The Following User Says Thank You to mmbob For This Useful Post:

    kibbles18 (03-30-2011)

  7. #5
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    127
    yeah we all start learning to hack somehow. if i wasnt trying to learn then i wouldnt be asking this question now would i?