CBaseAnimatingOverlay::SetLayerPriority
0x005ec780 · 693 bytes · __thiscall
_ZN21CBaseAnimatingOverlay16SetLayerPriorityEii
Decompiled
undefined (3 params)
/* CBaseAnimatingOverlay::SetLayerPriority(int, int) */
void __thiscall
CBaseAnimatingOverlay::SetLayerPriority(CBaseAnimatingOverlay *this,int param_1,int param_2)
{
undefined4 uVar1;
int iVar2;
CBaseEdict *pCVar3;
int iVar4;
int iVar5;
byte *pbVar6;
byte *pbVar7;
int iVar8;
int iVar9;
int local_20;
if (param_1 < 0) {
return;
}
iVar8 = *(int *)(this + 0x1400);
if (iVar8 <= param_1) {
return;
}
pbVar6 = *(byte **)(this + 0x13f4);
iVar4 = param_1 * 0x4c;
pbVar7 = pbVar6 + iVar4;
if ((*pbVar7 & 1) == 0) {
return;
}
if (*(int *)(pbVar7 + 0x38) == param_2) {
return;
}
if (0 < iVar8) {
iVar9 = 0;
do {
while ((pbVar7 = pbVar6 + iVar9 * 0x4c, (*pbVar7 & 1) != 0 &&
(iVar2 = *(int *)(pbVar7 + 0x3c), *(int *)(pbVar6 + iVar4 + 0x3c) < iVar2))) {
iVar8 = *(int *)(pbVar7 + 0x48);
if (iVar8 != 0) {
if (*(char *)(iVar8 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar8 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)(iVar8 + 0x70) = *(byte *)(iVar8 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar8 + 0x78) = 0;
*(undefined4 *)(iVar8 + 0x74) = uVar1;
}
*(int *)(pbVar7 + 0x3c) = iVar2 + -1;
iVar9 = iVar9 + 1;
pbVar6 = *(byte **)(this + 0x13f4);
iVar8 = *(int *)(this + 0x1400);
if (iVar8 <= iVar9) goto LAB_005ec880;
}
iVar9 = iVar9 + 1;
} while (iVar9 < iVar8);
LAB_005ec880:
if (0 < iVar8) {
iVar9 = 0;
local_20 = 0;
pbVar7 = pbVar6;
do {
if ((((iVar9 != param_1) && ((*pbVar7 & 1) != 0)) && (*(int *)(pbVar7 + 0x38) <= param_2))
&& (local_20 < *(int *)(pbVar7 + 0x3c) + 1)) {
local_20 = *(int *)(pbVar7 + 0x3c) + 1;
}
iVar9 = iVar9 + 1;
pbVar7 = pbVar7 + 0x4c;
} while (iVar9 != iVar8);
iVar8 = 0;
do {
while (((iVar8 != param_1 && (pbVar7 = pbVar6 + iVar8 * 0x4c, (*pbVar7 & 1) != 0)) &&
(iVar9 = *(int *)(pbVar7 + 0x3c), local_20 <= iVar9))) {
iVar2 = *(int *)(pbVar7 + 0x48);
if (iVar2 != 0) {
if (*(char *)(iVar2 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar2 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
}
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar2 + 0x78) = 0;
*(undefined4 *)(iVar2 + 0x74) = uVar1;
}
iVar8 = iVar8 + 1;
*(int *)(pbVar7 + 0x3c) = iVar9 + 1;
pbVar6 = *(byte **)(this + 0x13f4);
if (*(int *)(this + 0x1400) <= iVar8) goto LAB_005ec978;
}
iVar8 = iVar8 + 1;
} while (iVar8 < *(int *)(this + 0x1400));
LAB_005ec978:
pbVar7 = pbVar6 + iVar4;
goto LAB_005ec97e;
}
pbVar7 = pbVar6 + iVar4;
}
local_20 = 0;
LAB_005ec97e:
iVar8 = gpGlobals;
if (local_20 != *(int *)(pbVar7 + 0x3c)) {
iVar9 = *(int *)(pbVar7 + 0x48);
if (iVar9 != 0) {
if (*(char *)(iVar9 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar9 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar8 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar8 + 2) = 0;
}
}
else {
*(byte *)(iVar9 + 0x70) = *(byte *)(iVar9 + 0x70) | 1;
}
iVar8 = gpGlobals;
uVar1 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar9 + 0x78) = 0;
*(undefined4 *)(iVar9 + 0x74) = uVar1;
}
*(int *)(pbVar7 + 0x3c) = local_20;
pbVar7 = (byte *)(iVar4 + *(int *)(this + 0x13f4));
}
*(int *)(pbVar7 + 0x38) = param_2;
*(undefined4 *)(*(int *)(this + 0x13f4) + 0x44 + iVar4) = *(undefined4 *)(iVar8 + 0xc);
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.