IsVertAllowed
0x000d2110 · 348 bytes · __cdecl
_Z13IsVertAllowedP16CDispUtilsHelperRK10CVertIndexi
Decompiled
undefined (3 params)
/* IsVertAllowed(CDispUtilsHelper*, CVertIndex const&, int) */
undefined4 IsVertAllowed(CDispUtilsHelper *param_1,CVertIndex *param_2,int param_3)
{
undefined2 *puVar1;
byte bVar2;
byte bVar3;
int iVar4;
int iVar5;
int iVar6;
undefined4 *puVar7;
uint uVar8;
uint uVar9;
short local_20;
short local_1e;
iVar4 = (*(code *)**(undefined4 **)param_1)(param_1);
iVar4 = IsCorner(param_2,*(int *)(iVar4 + 0x24));
if (iVar4 == 0) {
iVar5 = (*(code *)**(undefined4 **)param_1)(param_1);
iVar4 = 0;
if (*(short *)param_2 != 0) {
iVar4 = 1 << ((byte)*(undefined4 *)(iVar5 + 0x1c) & 0x1f);
if (iVar4 == *(short *)(param_2 + 2)) {
iVar4 = 1;
}
else if (iVar4 == *(short *)param_2) {
iVar4 = 2;
}
else {
if (*(short *)(param_2 + 2) != 0) {
return 1;
}
iVar4 = 3;
}
}
iVar5 = GetSubNeighborIndex(param_1,iVar4,param_2);
if (iVar5 != -1) {
iVar6 = (**(code **)(*(int *)param_1 + 4))(param_1,iVar4);
puVar1 = (undefined2 *)(iVar6 + iVar5 * 6);
puVar7 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1,*puVar1);
bVar2 = *(byte *)(puVar1 + 2);
bVar3 = *(byte *)((int)puVar1 + 3);
iVar6 = (**(code **)*puVar7)(puVar7);
if (param_3 < *(int *)(iVar6 + 0x1c) +
*(int *)(g_ShiftInfos + (uint)bVar3 * 0x24 + (uint)bVar2 * 0xc + 4)) {
TransformIntoSubNeighbor(param_1,iVar4,iVar5,param_2,(CVertIndex *)&local_20);
iVar4 = (**(code **)*puVar7)(puVar7);
uVar9 = *(int *)(iVar4 + 0x24) * (int)local_1e + (int)local_20;
uVar8 = 1 << ((byte)uVar9 & 0x1f);
return CONCAT31((int3)(uVar8 >> 8),(puVar7[(uVar9 >> 5) + 0x77] & uVar8) != 0);
}
return 0;
}
}
return 1;
}
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.