Results 1 to 4 of 4

Thread: [AI movement] Jumping using movegravity()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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
    Thats a nice function

    Though missing sqrt, so I post your intsqrt() and the 2 sqrt-function of the extension:

    PHP Code:
    sqrt(arg) { return closer(800arg); }
    invSqrt(arg) { return closer(801arg); } // check: http://www.beyond3d.com/content/articles/8/

    intsqrt(input)
    {
        
    output 0;
        while(
    output output input)
            
    output++;
        if(
    maps\mp\_utility::abs(input output output) > maps\mp\_utility::abs(input - (output 1) * (output 1)))
            
    output--;
        return 
    output;

    File is here: http://killtube.org/downloads/cod2/e...n/std/math.gsc
    timescale 0.01

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

    Ni3ls (18th May 2013)

Posting Permissions

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