TerrorNavMesh::OnBreakableBroken
0x009791b0 · 470 bytes · __thiscall
_ZN13TerrorNavMesh17OnBreakableBrokenEP11CBaseEntity
Decompiled
undefined (2 params)
/* TerrorNavMesh::OnBreakableBroken(CBaseEntity*) */
void __thiscall TerrorNavMesh::OnBreakableBroken(TerrorNavMesh *this,CBaseEntity *param_1)
{
int *piVar1;
uint uVar2;
uint *puVar3;
undefined *puVar4;
int iVar5;
int local_48;
uint local_44;
int local_40;
Vector local_34 [8];
float local_2c;
Vector local_28 [24];
local_44 = 0xffffffff;
if (param_1 != (CBaseEntity *)0x0) {
puVar3 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
local_44 = *puVar3;
}
local_48 = *(int *)(this + 0x684);
if (0 < local_48) {
local_40 = 0;
piVar1 = (int *)(g_pEntityList + (local_44 & 0xfff) * 0x10 + 4);
puVar3 = *(uint **)(this + 0x678);
do {
iVar5 = 0;
if (local_44 != 0xffffffff) {
if (piVar1 == (int *)0x0) {
iVar5 = 0;
}
else if (piVar1[1] == local_44 >> 0xc) {
iVar5 = *piVar1;
}
}
uVar2 = *puVar3;
if (((uVar2 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar2 >> 0xc)) {
if (iVar5 == 0) goto LAB_009792a0;
}
else if (iVar5 == *(int *)(puVar4 + 4)) {
LAB_009792a0:
iVar5 = (local_48 - local_40) + -1;
if (0 < iVar5) {
_V_memmove(puVar3,*(uint **)(this + 0x678) + local_40 + 1,iVar5 * 4);
local_48 = *(int *)(this + 0x684);
}
*(int *)(this + 0x684) = local_48 + -1;
break;
}
local_40 = local_40 + 1;
puVar3 = puVar3 + 1;
} while (local_40 != local_48);
}
(**(code **)(*(int *)(param_1 + 0x194) + 0x3c))(param_1 + 0x194,local_34,local_28);
local_2c = local_2c - 55.0;
CUtlVector<Extent,CUtlMemory<Extent,int>>::InsertBefore
((CUtlVector<Extent,CUtlMemory<Extent,int>> *)(this + 0x68c),*(int *)(this + 0x698),
(Extent *)local_34);
if (*(int *)(ZombieDebug._28_4_ + 0x30) != 0) {
NDebugOverlay::Box((Vector *)&vec3_origin,local_34,local_28,0,0xff,0,0x40,5.0);
}
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.