L L4D2node

CBaseServerVehicle::GetPassengerSeatPoint

0x00b39eb0 · 507 bytes · __thiscall

_ZN18CBaseServerVehicle21GetPassengerSeatPointEiP6VectorP6QAngle

Decompiled

undefined (4 params)

/* CBaseServerVehicle::GetPassengerSeatPoint(int, Vector*, QAngle*) */

void __thiscall
CBaseServerVehicle::GetPassengerSeatPoint
          (CBaseServerVehicle *this,int param_1,Vector *param_2,QAngle *param_3)

{
  CBaseEntity *pCVar1;
  char cVar2;
  CBaseAnimating *this_00;
  int iVar3;
  int iVar4;
  int in_GS_OFFSET;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  char local_40 [32];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(this + 0x2c) != 0) {
    this_00 = (CBaseAnimating *)
              __dynamic_cast(*(int *)(this + 0x2c),&CBaseEntity::typeinfo,&CBaseAnimating::typeinfo,
                             0);
    if (this_00 != (CBaseAnimating *)0x0) {
      V_snprintf(local_40,0x20,"vehicle_feet_passenger%d",param_1);
      iVar3 = CBaseAnimating::LookupAttachment(this_00,local_40);
      iVar4 = (**(code **)(*(int *)this_00 + 0x340))(this_00,1);
      if ((iVar4 != -1) && (0 < iVar3)) {
        cVar2 = GetLocalAttachmentAtTime
                          (this,iVar4,iVar3,0.0,(Vector *)&local_58,(QAngle *)&local_4c);
        if (cVar2 != '\0') {
          UTIL_ParentToWorldSpace((CBaseEntity *)this_00,(Vector *)&local_58,(QAngle *)&local_4c);
          if (param_2 != (Vector *)0x0) {
            *(undefined4 *)param_2 = local_58;
            *(undefined4 *)(param_2 + 4) = local_54;
            *(undefined4 *)(param_2 + 8) = local_50;
          }
          if (param_3 != (QAngle *)0x0) {
            *(undefined4 *)param_3 = local_4c;
            *(undefined4 *)(param_3 + 4) = local_48;
            *(undefined4 *)(param_3 + 8) = local_44;
          }
          goto LAB_00b39fcb;
        }
      }
    }
  }
  if (param_2 != (Vector *)0x0) {
    pCVar1 = *(CBaseEntity **)(this + 0x2c);
    if (((byte)pCVar1[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(pCVar1);
    }
    *(undefined4 *)param_2 = *(undefined4 *)(pCVar1 + 0x2e0);
    *(undefined4 *)(param_2 + 4) = *(undefined4 *)(pCVar1 + 0x2e4);
    *(undefined4 *)(param_2 + 8) = *(undefined4 *)(pCVar1 + 0x2e8);
  }
  if (param_3 != (QAngle *)0x0) {
    pCVar1 = *(CBaseEntity **)(this + 0x2c);
    if (((byte)pCVar1[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(pCVar1);
    }
    *(undefined4 *)param_3 = *(undefined4 *)(pCVar1 + 0x37c);
    *(undefined4 *)(param_3 + 4) = *(undefined4 *)(pCVar1 + 0x380);
    *(undefined4 *)(param_3 + 8) = *(undefined4 *)(pCVar1 + 900);
  }
LAB_00b39fcb:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)