CFuncAreaPortalWindow::Activate
0x006b1150 · 423 bytes · __thiscall
_ZN21CFuncAreaPortalWindow8ActivateEv
Decompiled
undefined (1 param)
/* CFuncAreaPortalWindow::Activate() */
void __thiscall CFuncAreaPortalWindow::Activate(CFuncAreaPortalWindow *this)
{
code *pcVar1;
CBaseEdict *this_00;
code *pcVar2;
char *pcVar3;
CBaseEntity *this_01;
int iVar4;
int iVar5;
undefined1 *puVar6;
int *piVar7;
int *piVar8;
undefined1 *local_20 [4];
piVar8 = (int *)&stack0xffffffb4;
CBaseEntity::Activate((CBaseEntity *)this);
pcVar3 = *(char **)(this + 0x458);
if (pcVar3 == (char *)0x0) {
pcVar3 = "";
}
this_01 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar3,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if (this_01 != (CBaseEntity *)0x0) {
pcVar1 = *(code **)(*modelinfo + 0xc);
(**(code **)(*(int *)this_01 + 0x20))();
piVar8 = (int *)&stack0xffffffb0;
iVar4 = (*pcVar1)();
if (iVar4 != *(int *)(this + 0x45c)) {
if (this[0x6c] == (CFuncAreaPortalWindow)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar5 + 2) = 0;
}
*(int *)(this + 0x45c) = iVar4;
}
else {
this[0x70] = (CFuncAreaPortalWindow)((byte)this[0x70] | 1);
*(int *)(this + 0x45c) = iVar4;
}
}
CBaseEntity::AddEffects(this_01,0x20);
}
puVar6 = *(undefined1 **)(this + 0xf8);
piVar8[6] = 0;
piVar8[5] = 0;
piVar8[4] = 0;
piVar8[3] = 0;
piVar8[1] = 0;
if (puVar6 == (undefined1 *)0x0) {
puVar6 = &DAT_00d539c2;
}
*piVar8 = (int)gEntList;
piVar8[2] = (int)puVar6;
piVar8[-1] = 0x6b1277;
piVar7 = (int *)CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)*piVar8,(CBaseEntity *)piVar8[1],(char *)piVar8[2]
,(CBaseEntity *)piVar8[3],(CBaseEntity *)piVar8[4],
(CBaseEntity *)piVar8[5],(IEntityFindFilter *)piVar8[6]);
if (piVar7 != (int *)0x0) {
pcVar1 = *(code **)(*(int *)this + 0x70);
iVar4 = *piVar7;
*piVar8 = (int)local_20;
piVar8[1] = (int)piVar7;
pcVar2 = *(code **)(iVar4 + 0x20);
piVar8[-1] = 0x6b1294;
(*pcVar2)();
piVar8[-1] = (int)this;
puVar6 = &DAT_00d539c2;
if (local_20[0] != (undefined1 *)0x0) {
puVar6 = local_20[0];
}
*piVar8 = (int)puVar6;
piVar8[-2] = 0x6b12ab;
(*pcVar1)();
if ((*(byte *)((int)piVar7 + 0x14d) & 8) != 0) {
piVar8[-1] = (int)piVar7;
piVar8[-2] = 0x6b12e8;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)piVar8[-1]);
}
piVar8[-1] = (int)this;
*piVar8 = (int)(piVar7 + 0xb8);
piVar8[-2] = 0x6b12c6;
CBaseEntity::SetAbsOrigin((CBaseEntity *)piVar8[-1],(Vector *)*piVar8);
*piVar8 = 0x20;
piVar8[-1] = (int)piVar7;
piVar8[-2] = 0x6b12d6;
CBaseEntity::AddEffects((CBaseEntity *)piVar8[-1],*piVar8);
}
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.