Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Dec 2014
    Posts
    2

    [MW3 1.4.382] Why doesn't tag position change depending on stance?

    Hey,
    I've reversed AimAssist_GetTagPos and it seems to be working, but the weird thing is that the stance of the player doesn't affect the tag position - as if I were using entity_t.origin. I've isolated the relevant part of the code, this is the actual GetTagPos call (1.4.382):

    Code:
    typedef int(*GetTagByName_f)(char*);
    GetTagByName_f GetTagByName = (GetTagByName_f)GETTAGBYNAME_ADDR;   //0x4922E0
    
    
    float result[3];
    int tagNum = GetTagByName("j_head");      //yup, I realize calling it every frame instead of caching it is somewhat lame, but it shouldn't have any effect on the result
    
    DWORD dwCall = GETTAGPOS_ADDR;        //0x571790
    __asm LEA ESI, [result]
    __asm PUSH ESI
    __asm MOV EDI, tagNum
    __asm MOV ESI, ENTITY_BASE_ADDR        //0xA08630
    __asm CALL dwCall
    __asm ADD ESP, 4
          
    printf("location %.2lf %.2lf %.2lf | %.2lf %.2lf %.2lf ", result[0], result[1], result[2], ((entity_t*)ENTITY_BASE_ADDR)->Origin[0], ((entity_t*)ENTITY_BASE_ADDR)->Origin[1], ((entity_t*)ENTITY_BASE_ADDR)->Origin[2]);
    Obviously this only checks entity 0, I test it joining my empty server so that I'm entity 0.

    So basically, in this way, the position will change if I'm moving around, or even when I fire because of the recoil, but it will not change if I crouch/prone. Since it works for everyone I've asked, I'm not really sure what the issue could be. I had this wild idea that maybe I'm actually getting the position of my right/left ankle or whatever, that's why it wouldn't change with stance, but that makes no sense given that I use the GetTagByName function.

    Thanks for your help.
    Last edited by szczurcio; December 4th, 2014 at 01:30.

Bookmarks

Posting Permissions

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