L L4D2node

CBaseServerVehicle::SetPassenger

0x00b36b10 · 340 bytes · __thiscall

_ZN18CBaseServerVehicle12SetPassengerEiP20CBaseCombatCharacter

Decompiled

undefined (3 params)

/* CBaseServerVehicle::SetPassenger(int, CBaseCombatCharacter*) */

void __thiscall
CBaseServerVehicle::SetPassenger(CBaseServerVehicle *this,int param_1,CBaseCombatCharacter *param_2)

{
  uint uVar1;
  char cVar2;
  undefined4 *puVar3;
  CBasePlayer *this_00;
  CBaseEntity *pCVar4;
  undefined *puVar5;
  
  if (param_2 == (CBaseCombatCharacter *)0x0) {
    this_00 = (CBasePlayer *)(**(code **)(*(int *)this + 0xf0))(this);
    if (this_00 != (CBasePlayer *)0x0) {
      cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
      if (cVar2 != '\0') {
        (**(code **)(*(int *)this_00 + 0x254))(this_00,this + 0x7c);
        CBasePlayer::ShowCrosshair(this_00,true);
      }
    }
    (**(code **)(**(int **)(this + 0x30) + 0x2c))(*(int **)(this + 0x30),param_1);
    (**(code **)(**(int **)(this + 0x30) + 0x1c))(*(int **)(this + 0x30),0);
    uVar1 = *(uint *)(this + 0x88);
    pCVar4 = (CBaseEntity *)0x0;
    if (((uVar1 != 0xffffffff) &&
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
      pCVar4 = *(CBaseEntity **)(puVar5 + 4);
    }
    UTIL_Remove(pCVar4);
    return;
  }
  cVar2 = (**(code **)(*(int *)param_2 + 0x16c))(param_2);
  if (cVar2 != '\0') {
    cVar2 = (**(code **)(*(int *)param_2 + 0x16c))(param_2);
    if (cVar2 != '\0') {
      puVar3 = (undefined4 *)(**(code **)(*(int *)param_2 + 0x250))(param_2);
      *(undefined4 *)(this + 0x7c) = *puVar3;
      *(undefined4 *)(this + 0x80) = puVar3[1];
      *(undefined4 *)(this + 0x84) = puVar3[2];
      (**(code **)(*(int *)param_2 + 0x254))(param_2,&vec3_origin);
      CBasePlayer::ShowCrosshair((CBasePlayer *)param_2,false);
                    /* WARNING: Could not recover jumptable at 0x00b36bbd. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(**(int **)(this + 0x30) + 0x24))();
      return;
    }
  }
  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)