Jump to content

SET_PED_ONTO_MOUNT


Native Details

  • NameSET_PED_ONTO_MOUNT
  • NamespacePED
  • Native Hash0x028F76B6E78246EB
  • Typevoid
  • First seen version1207

Native Parameters

DESCRIPTION

There is no description yet for this native, why not edit it and add one?


User Feedback

Recommended Comments

void __fastcall set_ped_on_mount_func(__int64 ped, __int64 horse, signed int seat_place, char must_be_true)
{
  char smth_bool; // r12
  signed int seat; // esi
  __int64 horse_; // rbx
  __int64 ped__; // rdi
  signed __int64 get_ped_addr; // rax
  signed __int64 ped_addr; // r15
  int v10; // er9
  unsigned __int64 v11; // rax
  unsigned int v12; // er14
  signed __int64 v13; // rdx
  unsigned __int64 v14; // rsi
  unsigned __int64 v15; // rbp
  unsigned __int64 v16; // rax
  unsigned __int64 v17; // rcx
  char v18; // ST30_1
  signed int v19; // ST28_4
  __int64 v20; // ST20_8
  signed __int64 v21; // rcx
  unsigned __int64 v22; // rsi

  if ( ped )
  {
    smth_bool = must_be_true;
    seat = seat_place;
    horse_ = horse;
    ped__ = ped;
    get_ped_addr = sub_7FF6FF5C9448(ped);
    ped_addr = get_ped_addr;
    if ( horse_ )
    {
      if ( get_ped_addr )
      {
        v10 = dword_7FF70226C908;
        v11 = *(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 160) & 0xFFFFFFFFFFFFFFFEui64;
        if ( v11 & -(*(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 160) != 0i64) )
        {
          if ( *(*((v11 & -(*(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 160) != 0i64))
                 + 0x10)
               + 32i64) > 0.0 )
          {
            v12 = -1;
            if ( seat >= -1 )
              v12 = seat + 1;
            v13 = 328i64 * ((*(ped__ + 156) & 0x1FFFFu) - dword_7FF70226C908);
            v14 = *(v13 + qword_7FF70226C910 + 184) & 0xFFFFFFFFFFFFFFFEui64 & -(*(v13 + qword_7FF70226C910 + 184) != 0i64);
            v15 = *(v13 + qword_7FF70226C910 + 32) & 0xFFFFFFFFFFFFFFFEui64 & -(*(v13 + qword_7FF70226C910 + 32) != 0i64);
            if ( smth_bool )
            {
              if ( sub_7FF7014D20E4(horse_, 0i64) && !*(sub_7FF7014D20E4(horse_, 0i64) + 338) )
              {
                v16 = *(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 184) & 0xFFFFFFFFFFFFFFFEui64 & -(*(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 184) != 0i64);
                *(v16 + 16208) |= 0x40ui64;
                v13 = -*(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 32);
                v17 = *(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 32) & 0xFFFFFFFFFFFFFFFEui64 & -(*(328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908) + qword_7FF70226C910 + 32) != 0i64);
                *(v17 + 116) |= 0x10u;
              }
              *(v14 + 16208) |= 0x40ui64;
              *(v15 + 116) |= 0x10u;
            }
            LOBYTE(v10) = 1;
            v18 = 0;
            LOBYTE(v13) = 1;
            sub_7FF6FF1FB478(v14, v13, 1, v10, 1);
            v19 = 268435552;
            LOBYTE(v20) = 1;
            sub_7FF6FF368E5C(ped_addr, horse_, v12, 0i64, v20, v19, v18);
            v21 = 328i64 * ((*(horse_ + 156) & 0x1FFFFu) - dword_7FF70226C908);
            v22 = *(v21 + qword_7FF70226C910 + 208) & 0xFFFFFFFFFFFFFFFEui64 & -(*(v21 + qword_7FF70226C910 + 208) != 0i64);
            if ( v22 )
            {
              sub_7FF700BCFDB4(ped__, horse_, 0i64);
              sub_7FF70045C428(v22 + 1728);
              sub_7FF70045C420(v22 + 1728);
            }
          }
        }
      }
    }
  }
}

Code from IDA. IDK what give last param, i call him must_be_true, set to true

 

Link to comment
Share on other sites



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Red Dead Redemption 2 Native Database by www.mod-rdr.com, includes contributions by gudmunduro and alloc8or.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...