Finding a function within the sourcecode

Results 1 to 5 of 5
  1. #1
    Newbie idihaxyn is offline
    MemberRank
    Sep 2017 Join Date
    3Posts

    Finding a function within the sourcecode


    RaGEZONE Recommends

    RaGEZONE Recommends

    Hello, I have come to understand that, within the game, there is a mechanism by which the monsters teleport on to you if they were stuck at about the same position for a long enough time (about 25 seconds), I've tried to find that function in hope to maybe fix the well known "position bug" that people refer to when it comes to hit and run.. I could see why such function would exist since it could prevent exploiting the game by not getting hit whilst on a high object of some sort, which is why I assumed that its actually a function from the first place anyways xd..

    any idea what the function name is? and if that's even an accurate examination at all lol

    thanks!
    Last edited by idihaxyn; 3 Weeks Ago at 10:26 AM.


  2. #2
    Registered faketest1234 is offline
    MemberRank
    May 2017 Join Date
    19Posts

    Re: Finding a function within the sourcecode

    I don't know much about this issue, but have you tried looking in AIMonster.cpp. It seems like its probably somewhere in that file that such logic should be defined.

  3. #3
    Newbie idihaxyn is offline
    MemberRank
    Sep 2017 Join Date
    3Posts

    Re: Finding a function within the sourcecode

    Quote Originally Posted by faketest1234 View Post
    I don't know much about this issue, but have you tried looking in AIMonster.cpp. It seems like its probably somewhere in that file that such logic should be defined.
    Not sure, seems like a good place to begin with though, thanks!

  4. #4
    I αм α ѕαмυrαι Ketchup is offline
    ModeratorRank
    Jan 2009 Join Date
    LocalhostLocation
    545Posts

    Re: Finding a function within the sourcecode

    Quote Originally Posted by faketest1234 View Post
    I don't know much about this issue, but have you tried looking in AIMonster.cpp. It seems like its probably somewhere in that file that such logic should be defined.
    ^ This and search for SEC(
    ALL GAME RELATED PM'S WILL BE IGNORED.
    Discord [¤] Facebook [¤] Rules [¤] Subscribe [¤] Support

  5. #5
    Newbie idihaxyn is offline
    MemberRank
    Sep 2017 Join Date
    3Posts

    Re: Finding a function within the sourcecode

    Thanks guys, making some progress.. managed to find the part where it does that teleport thingy

    if( TIMEGETTIME > m_tmAttack ) // 공격 못한지 20초 지났냐?
    {
    m_tmAttack = TIMEGETTIME + s_tmAttack; // 타이머 리셋
    // 5초전 좌표와 지금 좌표의 거리를 계산.
    D3DXVECTOR3 vDist = pMover->GetPos() - m_vOldPos;
    vDist.y = 0; // 옆으로 살짝움직였는데 산위로 확 올라갔을땐 거리가 엄청 멀수 있다. 그래서 이렇게 한것.
    if( IsInRange( vDist, 2.0f ) ) // 2미터를 못벗어났다면 어딘가에 갖혔다는 뜻.
    {
    if( pMover->GetSpeed( pMover->m_pActMover->m_fSpeed ) > 0 ) // 마법적으로 움직이지 못하게 된상태에선 워프하면 안됨.
    {
    D3DXVECTOR3 vTarget = pTarget->GetPos();
    pMover->SetPos( vTarget ); // 갖혔으면 타겟쪽으로 바로 워프.
    g_UserMng.AddSetPos( pMover, pMover->GetPos() );
    }
    }
    #if __VER < 9 // __AI_0509
    else
    {
    m_tmReturnToBegin = TIMEGETTIME; // 다시 돌아갈땐 시간을 재기시작. x초간은 맞아도 반격안하고 계속 간다.
    if( dwAIState == STATE_STAND )
    DoReturnToBegin();
    SendAIMsg( AIMSG_SETSTATE, dwAIState );
    return TRUE;
    }
    #endif // __AI_0509
    m_vOldPos = pMover->GetPos(); // 현재 좌표를 저장함.
    }
    hopefully the theory is correct and it will help fix the position bug..

    as far as LAN server goes, the bug does not occur during tests, though like I said, those lines of code prevent exploiting areas in which monsters are stuck and cannot attack you back while you AOE, so a better coding needs to be done.
    Last edited by idihaxyn; 3 Weeks Ago at 11:33 AM.




Advertisement