CFuncElevator::InputMoveToFloor
0x006be6e0 · 366 bytes · __thiscall
_ZN13CFuncElevator16InputMoveToFloorER11inputdata_t
Decompiled
undefined (2 params)
/* CFuncElevator::InputMoveToFloor(inputdata_t&) */
void __thiscall CFuncElevator::InputMoveToFloor(CFuncElevator *this,inputdata_t *param_1)
{
char *pcVar1;
int iVar2;
CBaseEntity *this_00;
undefined4 *puVar3;
float fVar4;
if (this[0x508] == (CFuncElevator)0x0) {
return;
}
if (*(int *)(param_1 + 0x18) == 2) {
pcVar1 = *(char **)(param_1 + 8);
if (pcVar1 != (char *)0x0) goto LAB_006be713;
*(undefined4 *)(this + 0x504) = 0xffffffff;
pcVar1 = "";
iVar2 = _V_stricmp("","top");
if (iVar2 != 0) {
LAB_006be74d:
iVar2 = _V_stricmp(pcVar1,"bottom");
if (iVar2 != 0) {
this_00 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar1,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
if (this_00 == (CBaseEntity *)0x0) {
Warning();
return;
}
puVar3 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
*(undefined4 *)(this + 0x504) = *puVar3;
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
fVar4 = *(float *)(this_00 + 0x2e8);
goto LAB_006be828;
}
goto LAB_006be820;
}
}
else {
pcVar1 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
LAB_006be713:
*(undefined4 *)(this + 0x504) = 0xffffffff;
if (pcVar1 != "top") {
iVar2 = _V_stricmp(pcVar1,"top");
if (iVar2 != 0) {
if (pcVar1 != "bottom") goto LAB_006be74d;
LAB_006be820:
fVar4 = *(float *)(this + 0x4e0);
goto LAB_006be828;
}
}
}
fVar4 = *(float *)(this + 0x4d4);
LAB_006be828:
MoveTo(this,fVar4);
return;
}
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.