L L4D2node

CBaseServerVehicle::NPC_GetAvailableSeat_Any

0x00b3b500 · 102 bytes · __thiscall

_ZN18CBaseServerVehicle24NPC_GetAvailableSeat_AnyEP20CBaseCombatCharacteri

Decompiled

undefined (3 params)

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

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

{
  CBaseCombatCharacter *pCVar1;
  int iVar2;
  
  iVar2 = 0;
  if (0 < *(int *)(*(int *)(this + 0x18) + 0x10 + param_2 * 0x18)) {
    do {
      pCVar1 = (CBaseCombatCharacter *)(**(code **)(*(int *)this + 0x8c))(this,param_2,iVar2);
      if ((pCVar1 == param_1) || (pCVar1 == (CBaseCombatCharacter *)0x0)) {
        return iVar2;
      }
      iVar2 = iVar2 + 1;
    } while (iVar2 < *(int *)(*(int *)(this + 0x18) + 0x10 + param_2 * 0x18));
  }
  return -1;
}

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)