CCurveData::UpdateIntensityArea
0x00bae020 · 540 bytes · __thiscall
_ZN10CCurveData19UpdateIntensityAreaEP18ICurveDataAccessor
Decompiled
undefined (2 params)
/* CCurveData::UpdateIntensityArea(ICurveDataAccessor*) */
void __thiscall CCurveData::UpdateIntensityArea(CCurveData *this,ICurveDataAccessor *param_1)
{
int iVar1;
undefined4 *puVar2;
undefined4 *puVar3;
undefined4 *puVar4;
int iVar5;
int iVar6;
float fVar7;
bool local_59;
float local_58;
undefined4 local_54;
undefined4 local_50;
float local_4c;
undefined4 local_48;
undefined4 local_44;
float local_40;
undefined4 local_3c;
undefined4 local_38;
Vector local_34 [4];
float local_30;
float local_28;
undefined4 local_24;
undefined4 local_20;
iVar1 = *(int *)(this + 0xc);
if ((0 < iVar1) && (iVar6 = iVar1 + 2, *(int *)(this + 0x30) != iVar6)) {
*(undefined4 *)(this + 0x30) = 0;
CUtlVector<float,CUtlMemory<float,int>>::GrowVector
((CUtlVector<float,CUtlMemory<float,int>> *)(this + 0x24),iVar6);
if (0 < *(int *)(this + 0x30) - iVar6) {
_V_memmove((void *)((int)*(void **)(this + 0x24) + iVar6 * 4),*(void **)(this + 0x24),
(*(int *)(this + 0x30) - iVar6) * 4);
}
puVar2 = (undefined4 *)GetBoundedSample(this,param_1,-2,&local_59);
puVar3 = (undefined4 *)GetBoundedSample(this,param_1,-1,&local_59);
puVar4 = (undefined4 *)GetBoundedSample(this,param_1,0,&local_59);
local_54 = *puVar2;
local_58 = (float)puVar2[1];
local_50 = 0;
local_4c = (float)puVar3[1];
local_48 = *puVar3;
local_44 = 0;
iVar6 = -1;
local_3c = *puVar4;
local_40 = (float)puVar4[1];
local_38 = 0;
do {
iVar5 = iVar6 + 2;
if (iVar1 <= iVar6 + 2) {
iVar5 = iVar1;
}
iVar6 = iVar6 + 1;
puVar2 = (undefined4 *)GetBoundedSample(this,param_1,iVar5,&local_59);
local_24 = *puVar2;
local_28 = (float)puVar2[1];
local_20 = 0;
Catmull_Rom_Spline_Integral_Normalize
((Vector *)&local_58,(Vector *)&local_4c,(Vector *)&local_40,(Vector *)&local_28,1.0
,local_34);
fVar7 = 0.0;
if (0.0 <= local_30) {
fVar7 = local_30;
}
if (1.0 <= fVar7) {
fVar7 = 1.0;
}
*(float *)(*(int *)(this + 0x24) + iVar6 * 4) = (local_40 - local_4c) * fVar7;
local_58 = local_4c;
local_54 = local_48;
local_50 = local_44;
local_4c = local_40;
local_48 = local_3c;
local_44 = local_38;
local_40 = local_28;
local_3c = local_24;
local_38 = local_20;
} while (iVar6 != iVar1);
}
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.