Results 1 to 10 of 11

Thread: compare vpoint - player's looking position

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts
    Quote Originally Posted by kung foo man View Post
    No clue what you are trying to do, but you take the eye pos from eAttacker, but add the forward direction of self to it. Do you mean this?

    PHP Code:
    fw anglestoforward(eAttacker getplayerangles()); 
    And since getRealEye isn't a default function, just help people to understand your code by linking to its parts: https://github.com/kungfooman/cod2_s...utils.gsc#L184

    For debugging, you can either print the coordinates or just spawn some entities to that position
    with silent aim if player shoots (x , y , z) point , his bullets hits to (r , s , t) point. i am trying to find these points , thats what i am trying to do.

    Click image for larger version. 

Name:	shot0000.jpg 
Views:	57 
Size:	185.6 KB 
ID:	1380


    PHP Code:
    checkeVictim eInflictor eAttacker iDamage iDFlags sMeansOfDeath sWeapon vPoint vDir sHitLoc timeOffset )
    {

        
    start eAttacker getRealEye();   
        
    fw anglestoforward(eAttacker getplayerangles());
        
    end start maps\mp\_utility::vectorscalefw10000 );
        

        
    trace bulletTrace(startendtrueeAttacker);

        
        if( 
    trace["position"] == vPoint )
            return 
    false ;

        
    iPrintln("silent aim detected");
        return 
    true;
    }

    getRealEye()
    {
        
    player self;

        
    stance player getStance();
        
        
    offset 0;
        switch (
    stance)
        {
            case 
    "stand"offset =  20; break;
            case  
    "duck"offset =   0; break;
            case   
    "lie"offset = -30; break;
            
    //default: offset = getcvarint("offset");
        
    }

        
    realEye player getEye() + (0,0,offset);
        return 
    realEye;


    Quote Originally Posted by maxdamage99 View Post
    If player kill enemy in VERY SUPER SPEED MOUSE ?
    it happens in same frame , i dont think so it will be wrong

    Quote Originally Posted by voron00 View Post
    vPoint is the point of where the damage was taken, not bullet fired.
    how they cant be the same ? so there is a way to detect it ?
    Last edited by feanor; 17th November 2017 at 18:46.

Posting Permissions

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