CNavLadder::OnSplit
0x007325f0 · 161 bytes · __thiscall
_ZN10CNavLadder7OnSplitEP8CNavAreaS1_S1_
Decompiled
undefined (4 params)
/* CNavLadder::OnSplit(CNavArea*, CNavArea*, CNavArea*) */
void __thiscall
CNavLadder::OnSplit(CNavLadder *this,CNavArea *param_1,CNavArea *param_2,CNavArea *param_3)
{
CNavArea *pCVar1;
int iVar2;
CNavLadder *pCVar3;
longdouble lVar4;
longdouble lVar5;
iVar2 = 0;
do {
if (iVar2 == 2) {
pCVar3 = this + 0x2c;
}
else if (iVar2 < 3) {
pCVar3 = this + 0x28;
if (iVar2 != 1) {
LAB_0073263f:
pCVar3 = this + 0x24;
}
}
else {
pCVar3 = this + 0x30;
if ((iVar2 != 3) && (pCVar3 = this + 0x34, iVar2 != 4)) goto LAB_0073263f;
}
if ((pCVar3 != (CNavLadder *)0x0) && (*(CNavArea **)pCVar3 == param_1)) {
lVar4 = (longdouble)CNavArea::GetDistanceSquaredToPoint(param_2,(Vector *)(this + 4));
lVar5 = (longdouble)CNavArea::GetDistanceSquaredToPoint(param_3,(Vector *)(this + 4));
pCVar1 = param_3;
if ((float)lVar4 < (float)lVar5) {
pCVar1 = param_2;
}
*(CNavArea **)pCVar3 = pCVar1;
}
iVar2 = iVar2 + 1;
if (iVar2 == 5) {
return;
}
} while( true );
}
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.