CSequenceTransitioner::UpdateCurrent
0x004ae8b0 · 687 bytes · __thiscall
_ZN21CSequenceTransitioner13UpdateCurrentEP10CStudioHdrifff
Decompiled
undefined (6 params)
/* CSequenceTransitioner::UpdateCurrent(CStudioHdr*, int, float, float, float) */
void __thiscall
CSequenceTransitioner::UpdateCurrent
(CSequenceTransitioner *this,CStudioHdr *param_1,int param_2,float param_3,float param_4,
float param_5)
{
void *pvVar1;
undefined4 uVar2;
CBaseEdict *pCVar3;
int iVar4;
int iVar5;
int iVar6;
float fVar7;
int local_20;
if (param_1 != (CStudioHdr *)0x0) {
iVar5 = *(int *)(this + 0xc);
if (iVar5 == 0) {
CUtlVector<CAnimationLayer,CUtlMemory<CAnimationLayer,int>>::InsertBefore
((CUtlVector<CAnimationLayer,CUtlMemory<CAnimationLayer,int>> *)this,0);
iVar5 = *(int *)(this + 0xc);
}
iVar5 = (iVar5 + -1) * 0x4c + *(int *)this;
if (param_2 != *(int *)(iVar5 + 8)) {
iVar6 = *(int *)(iVar5 + 0x48);
if (iVar6 != 0) {
if (*(char *)(iVar6 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar6 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
}
uVar2 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar6 + 0x78) = 0;
*(undefined4 *)(iVar6 + 0x74) = uVar2;
}
*(int *)(iVar5 + 8) = param_2;
}
*(float *)(iVar5 + 0x2c) = param_5;
if (param_3 != *(float *)(iVar5 + 0xc)) {
iVar6 = *(int *)(iVar5 + 0x48);
if (iVar6 != 0) {
if (*(char *)(iVar6 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar6 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar6 + 0x70) = *(byte *)(iVar6 + 0x70) | 1;
}
uVar2 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar6 + 0x78) = 0;
*(undefined4 *)(iVar6 + 0x74) = uVar2;
}
*(float *)(iVar5 + 0xc) = param_3;
}
iVar6 = 0;
*(float *)(iVar5 + 0x18) = param_4;
local_20 = *(int *)(this + 0xc);
while (iVar5 = local_20 + -1, iVar6 < iVar5) {
while( true ) {
pvVar1 = (void *)(*(int *)this + iVar6 * 0x4c);
if (*(float *)((int)pvVar1 + 0x30) <= 0.0) break;
fVar7 = (*(float *)((int)pvVar1 + 0x2c) - param_5) / *(float *)((int)pvVar1 + 0x30) + 1.0;
if ((1.0 < fVar7) || (fVar7 <= 0.0)) {
if (1.0 <= fVar7) {
fVar7 = 1.0;
}
}
else {
fVar7 = fVar7 * fVar7 * 3.0 - (fVar7 + fVar7) * fVar7 * fVar7;
}
if (fVar7 <= 0.0) break;
if (fVar7 != *(float *)((int)pvVar1 + 0x14)) {
iVar5 = *(int *)((int)pvVar1 + 0x48);
if (iVar5 != 0) {
if (*(char *)(iVar5 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(iVar5 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
}
uVar2 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar5 + 0x78) = 0;
*(undefined4 *)(iVar5 + 0x74) = uVar2;
}
*(float *)((int)pvVar1 + 0x14) = fVar7;
local_20 = *(int *)(this + 0xc);
iVar5 = local_20 + -1;
}
iVar6 = iVar6 + 1;
if (iVar5 <= iVar6) {
return;
}
}
iVar4 = (local_20 - iVar6) + -1;
if (0 < iVar4) {
_V_memmove(pvVar1,(void *)(*(int *)this + 0x4c + iVar6 * 0x4c),iVar4 * 0x4c);
iVar5 = *(int *)(this + 0xc) + -1;
}
*(int *)(this + 0xc) = iVar5;
local_20 = iVar5;
}
}
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.