CGameMovement::GetWaterCheckPosition
0x00451d10 · 397 bytes · __thiscall
_ZN13CGameMovement21GetWaterCheckPositionEiP6Vector
Decompiled
undefined (3 params)
/* CGameMovement::GetWaterCheckPosition(int, Vector*) */
void __thiscall
CGameMovement::GetWaterCheckPosition(CGameMovement *this,int param_1,Vector *param_2)
{
float fVar1;
float fVar2;
float *pfVar3;
int iVar4;
fVar1 = *(float *)(*(int *)(this + 8) + 0x9c);
pfVar3 = (float *)(**(code **)(*(int *)this + 0x7c))(this);
fVar2 = *pfVar3;
pfVar3 = (float *)(**(code **)(*(int *)this + 0x80))(this);
*(float *)param_2 = (fVar2 + *pfVar3) * 0.5 + fVar1;
fVar1 = *(float *)(*(int *)(this + 8) + 0xa0);
iVar4 = (**(code **)(*(int *)this + 0x7c))(this);
fVar2 = *(float *)(iVar4 + 4);
iVar4 = (**(code **)(*(int *)this + 0x80))(this);
*(float *)(param_2 + 4) = (fVar2 + *(float *)(iVar4 + 4)) * 0.5 + fVar1;
iVar4 = *(int *)(this + 8);
if (param_1 == 2) {
fVar1 = *(float *)(iVar4 + 0xa4);
iVar4 = (**(code **)(*(int *)this + 0x7c))(this);
fVar2 = *(float *)(iVar4 + 8);
iVar4 = (**(code **)(*(int *)this + 0x80))(this);
*(float *)(param_2 + 8) = (fVar2 + *(float *)(iVar4 + 8)) * 0.5 + fVar1;
return;
}
if (param_1 != 3) {
fVar1 = *(float *)(iVar4 + 0xa4);
iVar4 = (**(code **)(*(int *)this + 0x7c))(this);
*(float *)(param_2 + 8) = fVar1 + 1.0 + *(float *)(iVar4 + 8);
return;
}
fVar1 = *(float *)(iVar4 + 0xa4);
iVar4 = (**(code **)(**(int **)(this + 4) + 0x250))(*(int **)(this + 4));
*(float *)(param_2 + 8) = fVar1 + *(float *)(iVar4 + 8);
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.