google-site-verification: googlebaca44933768a824.html [C++] GetFov buggy - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

[C++] GetFov buggy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [C++] GetFov buggy

    h3llo everybody. As I am learning C++, I made a nice h00k for CS:S (copy paste, yes..)
    But I have one problem with FOV. Im using this code:

    Code:
    if(!GetHitboxPosition(Cvars.aim_spot, m_vecPosition, c->viewangles, i) 
                 || GetFov( pLocal->GetRenderAngles(), vEyePos, m_vecPosition ) > Cvars.aim_fov)
                  continue;
    It is working, but if the enemy is visible and Fov is (for example) 3, my viewangles aim back.

    Thx anyway. :troll:

    #2
    Re: [C++] GetFov buggy

    get a book on trig bud before you think of this

    Comment


      #3
      Re: [C++] GetFov buggy

      Is this a joke or what ?
      With this single line of code we can?t help you at all, you need to show us your Methods too.

      and btw, never copy a code that inclues Method calls or variables you didn?t create.

      Comment


        #4
        Re: [C++] GetFov buggy

        im using this getfov func

        Code:
        float cAimbot::GetFov( QAngle angle, Vector src, Vector dst ) 
        { 
        	QAngle ang,aim; 
        	float fov; 
        
        	CalcAngle(src, dst, ang); 
        	MakeVector(angle, aim); 
        	MakeVector(ang, ang);      
        
        	float mag_s = sqrt((aim[0]*aim[0]) + (aim[1]*aim[1]) + (aim[2]*aim[2])); 
        	float mag_d = sqrt((aim[0]*aim[0]) + (aim[1]*aim[1]) + (aim[2]*aim[2])); 
        
        	float u_dot_v = aim[0]*ang[0] + aim[1]*ang[1] + aim[2]*ang[2]; 
        
        	fov = acos(u_dot_v / (mag_s*mag_d)) * (180.0 / M_PI); 
        
        	return fov; 
        }

        Comment


          #5
          Re: [C++] GetFov buggy

          Anyone !? :(

          Comment


            #6
            Re: [C++] GetFov buggy

            Originally posted by internaut View Post
            Anyone !? :(
            wav told you what to do

            Comment


              #7
              Re: [C++] GetFov buggy

              not now

              Comment


                #8
                Re: [C++] GetFov buggy

                I don?t know anyting about c++ so I can?t help you :P

                Comment


                  #9
                  Re: [C++] GetFov buggy

                  Originally posted by redbulli View Post
                  I don?t know anyting about c++ so I can?t help you :P
                  np, thx anyway

                  Comment

                  Working...
                  X