CBaseFlex::ProcessGestureSceneEvent
0x00625ba0 · 643 bytes · __thiscall
_ZN9CBaseFlex24ProcessGestureSceneEventEP15CSceneEventInfoP12CChoreoSceneP12CChoreoEvent
Decompiled
undefined (4 params)
/* CBaseFlex::ProcessGestureSceneEvent(CSceneEventInfo*, CChoreoScene*, CChoreoEvent*) */
CBaseFlex __thiscall
CBaseFlex::ProcessGestureSceneEvent
(CBaseFlex *this,CSceneEventInfo *param_1,CChoreoScene *param_2,CChoreoEvent *param_3)
{
char cVar1;
int iVar2;
int iVar3;
CBaseFlex CVar4;
longdouble lVar5;
longdouble lVar6;
longdouble lVar7;
float fVar8;
float fVar9;
if (param_1 == (CSceneEventInfo *)0x0 || param_3 == (CChoreoEvent *)0x0) {
return (CBaseFlex)0x0;
}
CVar4 = (CBaseFlex)0x0;
if (param_2 != (CChoreoScene *)0x0) {
iVar2 = *(int *)(param_1 + 0x14);
if (iVar2 == -2) {
HandleStartGestureSceneEvent(this,param_1,param_2,param_3,*(CChoreoActor **)(param_1 + 8));
iVar2 = *(int *)(param_1 + 0x14);
}
if (-1 < iVar2) {
lVar5 = (longdouble)(*(code *)**(undefined4 **)param_3)(param_3);
lVar6 = (longdouble)CChoreoScene::GetTime(param_2);
lVar7 = (longdouble)CChoreoEvent::GetStartTime(param_3);
lVar5 = (longdouble)
CChoreoEvent::GetOriginalPercentageFromPlaybackPercentage
(param_3,((float)lVar6 - (float)lVar7) / (float)lVar5);
CBaseAnimatingOverlay::SetLayerCycle
((CBaseAnimatingOverlay *)this,*(int *)(param_1 + 0x14),(float)lVar5);
lVar5 = (longdouble)CChoreoScene::GetTime(param_2);
lVar5 = (longdouble)CChoreoEvent::GetIntensity(param_3,(float)lVar5);
if (param_1[0x20] == (CSceneEventInfo)0x0) {
cVar1 = (**(code **)(*(int *)this + 0x154))(this);
fVar8 = *(float *)(param_1 + 0x24);
if (cVar1 == '\0') {
if (fVar8 < 0.8) {
fVar8 = fVar8 + 0.2;
fVar9 = fVar8 * fVar8 * 3.0 - (fVar8 + fVar8) * fVar8 * fVar8;
}
else {
fVar9 = 1.0;
fVar8 = fVar9;
}
*(float *)(param_1 + 0x24) = fVar8;
fVar9 = fVar9 * (float)lVar5;
}
else {
if (0.2 < fVar8) {
fVar8 = fVar8 - 0.2;
fVar9 = (float)lVar5 * (fVar8 * fVar8 * 3.0 - (fVar8 + fVar8) * fVar8 * fVar8);
}
else {
fVar9 = 0.0;
fVar8 = fVar9;
}
*(float *)(param_1 + 0x24) = fVar8;
}
}
else {
fVar8 = *(float *)(param_1 + 0x24);
fVar9 = (float)lVar5 * (fVar8 * fVar8 * 3.0 - (fVar8 + fVar8) * fVar8 * fVar8);
}
CBaseAnimatingOverlay::SetLayerWeight
((CBaseAnimatingOverlay *)this,*(int *)(param_1 + 0x14),fVar9);
CVar4 = this[0x17d0];
if (CVar4 != (CBaseFlex)0x0) {
iVar2 = *(int *)(param_1 + 0x18);
iVar3 = GetScenePriority(this,param_2);
CBaseAnimatingOverlay::SetLayerPriority
((CBaseAnimatingOverlay *)this,*(int *)(param_1 + 0x14),iVar2 + iVar3);
return CVar4;
}
}
CVar4 = (CBaseFlex)0x1;
}
return CVar4;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.