CBaseDoor::Use
0x0066a1f0 · 362 bytes · __cdecl
_ZN9CBaseDoor3UseEP11CBaseEntityS1_8USE_TYPEf
Decompiled
undefined (4 params)
/* CBaseDoor::Use(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */
void CBaseDoor::Use(CBaseDoor *param_1,CBaseEntity *param_2,CBaseEntity *param_3)
{
int *piVar1;
char cVar2;
int iVar3;
undefined4 *puVar4;
uint uVar5;
undefined *puVar6;
uint uVar7;
iVar3 = (**(code **)(*(int *)param_2 + 0x14c))(param_2);
if (((iVar3 == 0) || (((byte)param_1[0x149] & 2) == 0)) &&
((iVar3 = CBaseEntity::GetTeamNumber(param_2), iVar3 != 3 || (((byte)param_1[0x14a] & 2) == 0))
)) {
puVar4 = (undefined4 *)(**(code **)(*(int *)param_2 + 0xc))(param_2);
*(undefined4 *)(param_1 + 0x494) = *puVar4;
if (*(int *)(param_1 + 0x518) != 0) {
ChainUse(param_1);
}
uVar5 = *(uint *)(param_1 + 0x494);
if ((((uVar5 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar5 >> 0xc)) ||
(piVar1 = *(int **)(puVar6 + 4), piVar1 == (int *)0x0)) {
uVar5 = *(uint *)(param_1 + 0x148);
}
else {
cVar2 = (**(code **)(*piVar1 + 0x16c))(piVar1);
uVar5 = *(uint *)(param_1 + 0x148);
if ((cVar2 != '\0') && ((uVar5 & 0x100) == 0)) goto LAB_0066a316;
}
if ((uVar5 & 0x10000) == 0) {
uVar7 = *(uint *)(param_1 + 0x440);
}
else {
uVar7 = *(uint *)(param_1 + 0x440) & 0xfffffffd;
}
if ((uVar7 == 1) || (((uVar5 & 0x20) != 0 && (uVar7 == 0)))) {
if (param_1[0x4fc] == (CBaseDoor)0x0) {
DoorActivate(param_1);
return;
}
COutputEvent::FireOutput((COutputEvent *)(param_1 + 0x5e0),param_2,param_3,0.0);
LAB_0066a316:
PlayLockSounds((CBaseEntity *)param_1,(locksound_t *)(param_1 + 0x4d0),1,0);
return;
}
}
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.