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
    124

    [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
    LionelMessi10's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    MPGH.NET
    Posts
    6,125
    Reputation
    114
    Thanks
    4,545
    My Mood
    Aggressive
    Lulz Gellin Vip Base

  3. #3
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    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
    655
    Reputation
    70
    Thanks
    1,156
    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
    124
    yeah we all start learning to hack somehow. if i wasnt trying to learn then i wouldnt be asking this question now would i?