ZombieBotLocomotion::JumpAcrossGap
0x00a51050 · 470 bytes · __cdecl
_ZN19ZombieBotLocomotion13JumpAcrossGapERK6VectorS2_
Decompiled
undefined (2 params)
/* ZombieBotLocomotion::JumpAcrossGap(Vector const&, Vector const&) */
void ZombieBotLocomotion::JumpAcrossGap(Vector *param_1,Vector *param_2)
{
float fVar1;
float fVar2;
float fVar3;
code *pcVar4;
char cVar5;
int *piVar6;
float *pfVar7;
undefined4 uVar8;
longdouble lVar9;
float fVar10;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
cVar5 = (**(code **)(*(int *)param_1 + 0xf8))(param_1);
if (cVar5 == '\0') {
return;
}
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xb0))(param_1);
piVar6 = (int *)(**(code **)(*piVar6 + 0xc4))(piVar6);
if ((piVar6 != (int *)0x0) &&
(cVar5 = (**(code **)(*piVar6 + 0xd8))(piVar6,0x295,0), cVar5 == '\0')) {
return;
}
pfVar7 = (float *)(**(code **)(*(int *)param_1 + 300))(param_1);
fVar1 = *(float *)(param_2 + 8);
local_34 = *(float *)param_2 - *pfVar7;
fVar2 = pfVar7[2];
local_30 = *(float *)(param_2 + 4) - pfVar7[1];
local_2c = 0.0;
lVar9 = (longdouble)VectorNormalize((Vector *)&local_34);
fVar3 = (float)lVar9;
fVar10 = fVar3 * 0.9;
if (fVar1 - fVar2 <= fVar3 * 0.9) {
fVar10 = fVar1 - fVar2;
}
fVar1 = (fVar3 * 1.4142271) /
SQRT(((fVar3 - fVar10) + (fVar3 - fVar10)) / *(float *)(NextBotGravity._28_4_ + 0x2c));
local_28 = local_34;
local_24 = local_30;
local_20 = local_2c + 1.0;
VectorNormalize((Vector *)&local_28);
param_1[0xc0] = (Vector)0x1;
param_1[0xc1] = (Vector)0x1;
param_1[0xd4] = (Vector)0x0;
*(float *)(param_1 + 0x74) = local_20 * fVar1;
uVar8 = vec3_origin;
*(float *)(param_1 + 0x70) = local_24 * fVar1;
*(undefined4 *)(param_1 + 0x94) = uVar8;
uVar8 = DAT_01053d4c;
*(float *)(param_1 + 0x6c) = fVar1 * local_28;
*(undefined4 *)(param_1 + 0x98) = uVar8;
*(undefined4 *)(param_1 + 0x9c) = DAT_01053d50;
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xb0))(param_1);
pcVar4 = *(code **)(*piVar6 + 0x14);
uVar8 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(param_1 + 0x78));
(*pcVar4)(piVar6,uVar8);
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.