L L4D2node

CBaseServerVehicle::NPC_GetAvailableSeat

0x00b3b6d0 · 109 bytes · __thiscall

_ZN18CBaseServerVehicle20NPC_GetAvailableSeatEP20CBaseCombatCharacter8string_t18VehicleSeatQuery_e

Decompiled

undefined (4 params)

/* CBaseServerVehicle::NPC_GetAvailableSeat(CBaseCombatCharacter*, string_t, VehicleSeatQuery_e) */

undefined4 __thiscall
CBaseServerVehicle::NPC_GetAvailableSeat
          (CBaseServerVehicle *param_1,CBaseCombatCharacter *param_2,undefined4 param_3,int param_4)

{
  int iVar1;
  undefined4 uVar2;
  
  if (param_1[0x68] == (CBaseServerVehicle)0x0) {
    (**(code **)(*(int *)param_1 + 0xf4))(param_1);
    param_1[0x68] = (CBaseServerVehicle)0x1;
  }
  iVar1 = FindRoleIndexByName(param_1,param_3);
  if (((-1 < iVar1) && (iVar1 < *(int *)(param_1 + 0x24))) && (param_4 == 0)) {
    uVar2 = NPC_GetAvailableSeat_Any(param_1,param_2,iVar1);
    return uVar2;
  }
  return 0xffffffff;
}

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)