CParticleSystem::SetControlPointValue
0x00770150 · 261 bytes · __thiscall
_ZN15CParticleSystem20SetControlPointValueEiRK6Vector
Decompiled
undefined (3 params)
/* CParticleSystem::SetControlPointValue(int, Vector const&) */
undefined4 __thiscall
CParticleSystem::SetControlPointValue(CParticleSystem *this,int param_1,Vector *param_2)
{
CParticleSystem *pCVar1;
CParticleSystem CVar2;
CBaseEdict *pCVar3;
CParticleSystem CVar4;
int iVar5;
int iVar6;
iVar6 = 0;
do {
if ((uint)(byte)this[iVar6 + 0x484] == param_1) {
if (this[0x6c] == (CParticleSystem)0x0) goto LAB_007701aa;
LAB_00770240:
this[0x70] = (CParticleSystem)((byte)this[0x70] | 1);
LAB_007701c5:
pCVar1 = this + iVar6 * 0xc + 0x454;
*(undefined4 *)pCVar1 = *(undefined4 *)param_2;
*(undefined4 *)(pCVar1 + 4) = *(undefined4 *)(param_2 + 4);
*(undefined4 *)(pCVar1 + 8) = *(undefined4 *)(param_2 + 8);
return 1;
}
if (this[iVar6 + 0x484] == (CParticleSystem)0xff) {
CVar4 = SUB41(param_1,0);
if (this[0x6c] == (CParticleSystem)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 == (CBaseEdict *)0x0) {
this[iVar6 + 0x484] = CVar4;
}
else {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
CVar2 = this[0x6c];
this[iVar6 + 0x484] = CVar4;
if (CVar2 != (CParticleSystem)0x0) goto LAB_00770240;
}
LAB_007701aa:
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
goto LAB_007701c5;
}
this[iVar6 + 0x484] = CVar4;
goto LAB_00770240;
}
iVar6 = iVar6 + 1;
if (iVar6 == 4) {
Warning("No free server controlled control points.\n");
return 0;
}
} 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.