Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: fov

  1. #1
    Private
    Join Date
    May 2013
    Posts
    21
    Thanks
    5
    Thanked 2 Times in 2 Posts

    fov

    PHP Code:
    trace = []; count 0; for (08f++)
    {
            
    vec anglesToForward(self getPlayerAngles() + (-+ (2), -20));
            
    trace[count] = bulletTrace(self getEye() + (0018), self getEye() + (20000 vec[0], 20000 vec[1], 20000 vec[2] + 18), trueself);
            
    count++;
            for (
    08p++)
            {
                    
    vec anglesToForward(self getPlayerAngles() + (-+ (2), -+ (2), 0));
                    
    trace[count] = bulletTrace(self getEye() + (0018), self getEye() + (20000 vec[0], 20000 vec[1], 20000 vec[2] + 18), trueself);
                    
    count++;
            }

    This code builds a 'fov' right? What numbers to tweak to make it 'bigger'?

  2. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Just use
    Code:
    self setClientCvar("cg_fov", "160");
    default = 80

  3. #3
    Private
    Join Date
    May 2013
    Posts
    21
    Thanks
    5
    Thanked 2 Times in 2 Posts
    this is setting a fov for something else, not the players view

  4. #4
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    What kind of other fov's are there? :/ (F)ield (o)f (V)iew

  5. #5
    Private
    Join Date
    May 2013
    Posts
    21
    Thanks
    5
    Thanked 2 Times in 2 Posts
    'fov' for an aimbot, idk what else to call it

  6. #6
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    You mean to get players in sight? And then rotate to them and kill them?

  7. #7
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You can increase both 8's, till your server is lagging like mad. Now you have 8x8=64 traces. Why dont you just iterate the players-array and compare the forward-vector and the delta-vector to each enemy with vectordot()?
    timescale 0.01

  8. The Following User Says Thank You to kung foo man For This Useful Post:

    omnimouz (15th May 2013)

  9. #8
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by omnimouz View Post
    'fov' for an aimbot, idk what else to call it
    Isn't it a "Line of Sight" code? Looks like that to me. Does COD2 have sightconeTrace() like COD4? If so, use that instead.

  10. The Following User Says Thank You to Tally For This Useful Post:

    omnimouz (15th May 2013)

  11. #9
    Private
    Join Date
    May 2013
    Posts
    21
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Tally View Post
    Isn't it a "Line of Sight" code? Looks like that to me. Does COD2 have sightconeTrace() like COD4? If so, use that instead.
    Yes and yes

    Quote Originally Posted by kung foo man View Post
    You can increase both 8's, till your server is lagging like mad. Now you have 8x8=64 traces. Why dont you just iterate the players-array and compare the forward-vector and the delta-vector to each enemy with vectordot()?
    thanks, 16x16 is fine, doesnt cause too much lag but I'll try out the method you suggested aswell

  12. #10
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    you should tell us what EXACTLY you want to do
    getting players in view or not, with sighttraces or detect walls or other entities or what?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •