CFuncElevator::IsPlayerOnElevator
0x006bd630 · 330 bytes · __thiscall
_ZN13CFuncElevator18IsPlayerOnElevatorEP11CBasePlayer
Decompiled
undefined (2 params)
/* CFuncElevator::IsPlayerOnElevator(CBasePlayer*) */
undefined4 __thiscall CFuncElevator::IsPlayerOnElevator(CFuncElevator *this,CBasePlayer *param_1)
{
int *piVar1;
uint uVar2;
undefined4 uVar3;
CFuncElevator *pCVar4;
CFuncElevator *pCVar5;
CFuncElevator *pCVar6;
undefined *puVar7;
uVar3 = (**(code **)(*(int *)param_1 + 300))(param_1);
if (((char)uVar3 == '\0') ||
(pCVar4 = (CFuncElevator *)CBaseEntity::GetGroundEntity((CBaseEntity *)param_1),
pCVar4 == (CFuncElevator *)0x0)) {
uVar3 = 0;
}
else if (pCVar4 != this) {
uVar2 = *(uint *)(pCVar4 + 0x180);
pCVar5 = (CFuncElevator *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar2 >> 0xc)) {
pCVar5 = *(CFuncElevator **)(puVar7 + 4);
}
piVar1 = (int *)(g_pEntityList + (uVar2 & 0xfff) * 0x10 + 4);
do {
pCVar6 = pCVar5;
if (((pCVar6 == (CFuncElevator *)0x0) || (uVar2 == 0xffffffff)) ||
((piVar1 == (int *)0x0 ||
((piVar1[1] != uVar2 >> 0xc ||
(pCVar5 = (CFuncElevator *)*piVar1, pCVar5 == (CFuncElevator *)0x0)))))) break;
} while (pCVar6 != pCVar5);
if (this != pCVar6) {
uVar2 = *(uint *)(pCVar4 + 0x188);
pCVar4 = (CFuncElevator *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar2 >> 0xc)) {
pCVar4 = *(CFuncElevator **)(puVar7 + 4);
}
piVar1 = (int *)(g_pEntityList + (uVar2 & 0xfff) * 0x10 + 4);
while ((pCVar5 = pCVar4, pCVar5 != (CFuncElevator *)0x0 && (uVar2 != 0xffffffff))) {
if (((piVar1 == (int *)0x0) ||
((piVar1[1] != uVar2 >> 0xc ||
(pCVar4 = (CFuncElevator *)*piVar1, pCVar4 == (CFuncElevator *)0x0)))) ||
(pCVar5 == pCVar4)) break;
}
return CONCAT31((uint3)(uVar2 >> 0x14),this == pCVar5);
}
}
return uVar3;
}
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.