CPropDoorRotatingCheckpoint::OnCheckpointDoorUnlocked
0x007f3bc0 · 417 bytes · __thiscall
_ZN27CPropDoorRotatingCheckpoint24OnCheckpointDoorUnlockedEP11CBaseEntity
Decompiled
undefined (2 params)
/* CPropDoorRotatingCheckpoint::OnCheckpointDoorUnlocked(CBaseEntity*) */
void __thiscall
CPropDoorRotatingCheckpoint::OnCheckpointDoorUnlocked
(CPropDoorRotatingCheckpoint *this,CBaseEntity *param_1)
{
code *pcVar1;
char cVar2;
int iVar3;
int *piVar4;
undefined4 uVar5;
CBaseEntity *pCVar6;
char *pcVar7;
undefined1 local_24 [20];
if (this[0x17cc] == (CPropDoorRotatingCheckpoint)0x0) {
CBasePropDoor::Unlock((CBasePropDoor *)this,true);
return;
}
iVar3 = CBaseAnimating::GetSequenceActivity((CBaseAnimating *)this,*(int *)(this + 0x494));
if (iVar3 != 0x333) {
CBaseEntity::EmitSound((CBaseEntity *)this,"Doors.Checkpoint.Unlock",0.0,(float *)0x0);
iVar3 = (**(code **)(*(int *)this + 0x340))(this,0x333);
CDynamicProp::PropSetSequence((CDynamicProp *)this,iVar3);
uVar5 = *(undefined4 *)(gpGlobals + 0xc);
pcVar7 = "UNLOCK_CONTEXT";
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)UnlockThink);
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"door_unlocked",0,0,uVar5,pcVar7);
if (piVar4 != (int *)0x0) {
(**(code **)(*piVar4 + 0x2c))(piVar4,"checkpoint",1);
if ((param_1 == (CBaseEntity *)0x0) ||
(cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar2 == '\0')) {
(**(code **)(*piVar4 + 0x30))(piVar4,"userid",0);
}
else {
pcVar1 = *(code **)(*piVar4 + 0x30);
cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
pCVar6 = (CBaseEntity *)0x0;
if (cVar2 != '\0') {
pCVar6 = param_1;
}
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(pCVar6 + 0x30));
(*pcVar1)(piVar4,"userid",uVar5);
}
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
return;
}
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.