L L4D2node

CPropVehicleDriveable::EnterVehicle

0x00b354d0 · 604 bytes · __thiscall

_ZN21CPropVehicleDriveable12EnterVehicleEP20CBaseCombatCharacter

Decompiled

undefined (2 params)

/* CPropVehicleDriveable::EnterVehicle(CBaseCombatCharacter*) */

void __thiscall
CPropVehicleDriveable::EnterVehicle(CPropVehicleDriveable *this,CBaseCombatCharacter *param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  uint uVar7;
  CBaseEdict *this_00;
  undefined4 uVar8;
  char cVar9;
  int iVar10;
  undefined4 *puVar11;
  int *piVar12;
  uint uVar13;
  
  if ((param_1 == (CBaseCombatCharacter *)0x0) ||
     (cVar9 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar9 == '\0')) {
    return;
  }
  uVar7 = *(uint *)(this + 0x15e8);
  if (uVar7 != 0xffffffff) {
    uVar13 = uVar7 & 0xfff;
    piVar12 = (int *)(g_pEntityList + uVar13 * 0x10 + 4);
    if (piVar12 != (int *)0x0) {
      if ((*(uint *)(g_pEntityList + uVar13 * 0x10 + 8) == uVar7 >> 0xc) &&
         (*(int *)(g_pEntityList + uVar13 * 0x10 + 4) != 0)) {
        (**(code **)(*(int *)this + 0x404))(this,0);
        uVar7 = *(uint *)(this + 0x15e8);
        if (((uVar7 != 0xffffffff) &&
            (piVar12 = (int *)(g_pEntityList + (uVar7 & 0xfff) * 0x10 + 4), piVar12 != (int *)0x0))
           && (piVar12[1] == uVar7 >> 0xc)) {
LAB_00b35736:
          if (param_1 == (CBaseCombatCharacter *)*piVar12) goto LAB_00b35570;
        }
      }
      else if (*(uint *)(g_pEntityList + uVar13 * 0x10 + 8) == uVar7 >> 0xc) goto LAB_00b35736;
    }
  }
  if (this[0x6c] == (CPropVehicleDriveable)0x0) {
    this_00 = *(CBaseEdict **)(this + 0x30);
    if (this_00 != (CBaseEdict *)0x0) {
      *(uint *)this_00 = *(uint *)this_00 | 0x101;
      iVar10 = CBaseEdict::GetChangeAccessor(this_00);
      *(undefined2 *)(iVar10 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CPropVehicleDriveable)((byte)this[0x70] | 1);
  }
  puVar11 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
  *(undefined4 *)(this + 0x15e8) = *puVar11;
LAB_00b35570:
  COutputEvent::FireOutput
            ((COutputEvent *)(this + 0x1558),(CBaseEntity *)param_1,(CBaseEntity *)this,0.0);
  if (this[0x162c] == (CPropVehicleDriveable)0x0) {
    StartEngine(this);
  }
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
  iVar10 = *(int *)(this + 0x1554);
  fVar1 = *(float *)(iVar10 + 0x7c);
  fVar2 = *(float *)(iVar10 + 0x80);
  fVar3 = *(float *)(iVar10 + 0x84);
  puVar11 = (undefined4 *)(**(code **)(*(int *)param_1 + 0x238))(param_1);
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
  }
  iVar10 = *(int *)(this + 0x1554);
  fVar4 = *(float *)(param_1 + 0x2e8);
  fVar5 = *(float *)(param_1 + 0x2e0);
  fVar6 = *(float *)(param_1 + 0x2e4);
  *(undefined1 *)(iVar10 + 0x1de) = 0;
  *(float *)(iVar10 + 500) = fVar1 + fVar5;
  *(float *)(iVar10 + 0x1f8) = fVar2 + fVar6;
  *(float *)(iVar10 + 0x1fc) = fVar3 + fVar4;
  *(undefined4 *)(iVar10 + 0x1e8) = *puVar11;
  *(undefined4 *)(iVar10 + 0x1ec) = puVar11[1];
  uVar8 = r_JeepFOV._28_4_;
  *(undefined4 *)(iVar10 + 0x1f0) = puVar11[2];
  *(undefined4 *)(iVar10 + 0x1b8) = *(undefined4 *)(uVar8 + 0x2c);
                    /* WARNING: Could not recover jumptable at 0x00b35694. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(**(int **)(this + 0x141c) + 0x30))();
  return;
}

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)