L L4D2node

CBaseServerVehicle::NPC_RemovePassenger

0x00b36a50 · 185 bytes · __thiscall

_ZN18CBaseServerVehicle19NPC_RemovePassengerEP20CBaseCombatCharacter

Decompiled

undefined (2 params)

/* CBaseServerVehicle::NPC_RemovePassenger(CBaseCombatCharacter*) */

undefined1 __thiscall
CBaseServerVehicle::NPC_RemovePassenger(CBaseServerVehicle *this,CBaseCombatCharacter *param_1)

{
  uint uVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  undefined *puVar5;
  
  if (((param_1 != (CBaseCombatCharacter *)0x0) &&
      (cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar2 == '\0')) &&
     (0 < *(int *)(this + 0x10))) {
    iVar4 = *(int *)(this + 4);
    iVar3 = 0;
    do {
      uVar1 = *(uint *)(iVar4 + 0x10);
      if (((uVar1 != 0xffffffff) &&
          (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
         ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
          (param_1 == *(CBaseCombatCharacter **)(puVar5 + 4))))) {
        *(undefined4 *)(iVar4 + 0x10) = 0xffffffff;
        return 1;
      }
      iVar3 = iVar3 + 1;
      iVar4 = iVar4 + 0x14;
    } while (iVar3 != *(int *)(this + 0x10));
  }
  return 0;
}

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)