L L4D2node

CFourWheelServerVehicle::NPC_SetDriver

0x00b35410 · 184 bytes · __thiscall

_ZN23CFourWheelServerVehicle13NPC_SetDriverEP18CNPC_VehicleDriver

Decompiled

undefined (2 params)

/* CFourWheelServerVehicle::NPC_SetDriver(CNPC_VehicleDriver*) */

void __thiscall
CFourWheelServerVehicle::NPC_SetDriver(CFourWheelServerVehicle *this,CNPC_VehicleDriver *param_1)

{
  int iVar1;
  undefined4 *puVar2;
  
  if (param_1 == (CNPC_VehicleDriver *)0x0) {
    *(undefined4 *)(*(int *)(this + 0x2c) + 0x161c) = 0xffffffff;
    CFourWheelVehiclePhysics::TurnOff((CFourWheelVehiclePhysics *)(*(int *)(this + 0x2c) + 0x13f8));
    (**(code **)(**(int **)(this + 0x2c) + 0x50))(*(int **)(this + 0x2c),0);
    *(undefined4 *)(this + 0x180) = 0x3f000000;
  }
  else {
    *(undefined4 *)(this + 0x34) = 0;
    iVar1 = *(int *)(this + 0x2c);
    puVar2 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
    *(undefined4 *)(iVar1 + 0x161c) = *puVar2;
    CPropVehicleDriveable::StartEngine(*(CPropVehicleDriveable **)(this + 0x2c));
    *(undefined4 *)(this + 0x180) = 0x3f800000;
    (**(code **)(**(int **)(this + 0x2c) + 0x50))(*(int **)(this + 0x2c),param_1);
    CBaseEntity::SetNextThink
              (*(CBaseEntity **)(this + 0x2c),*(float *)(gpGlobals + 0xc),(char *)0x0);
  }
  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)