CBaseServerVehicle::NPC_GetPassengerInSeat
0x00b363b0 · 99 bytes · __thiscall
_ZN18CBaseServerVehicle22NPC_GetPassengerInSeatEii
Decompiled
undefined (3 params)
/* CBaseServerVehicle::NPC_GetPassengerInSeat(int, int) */
undefined4 __thiscall
CBaseServerVehicle::NPC_GetPassengerInSeat(CBaseServerVehicle *this,int param_1,int param_2)
{
uint uVar1;
int *piVar2;
undefined *puVar3;
int iVar4;
if (0 < *(int *)(this + 0x10)) {
piVar2 = *(int **)(this + 4);
iVar4 = 0;
do {
if ((piVar2[1] == param_2) && (*piVar2 == param_1)) {
uVar1 = piVar2[4];
if (uVar1 == 0xffffffff) {
return 0;
}
puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
if (puVar3 == (undefined *)0xfffffffc) {
return 0;
}
if (*(uint *)(puVar3 + 8) != uVar1 >> 0xc) {
return 0;
}
return *(undefined4 *)(puVar3 + 4);
}
iVar4 = iVar4 + 1;
piVar2 = piVar2 + 5;
} while (iVar4 != *(int *)(this + 0x10));
}
return 0;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.