CChoreoScene::Think
0x00bb6e40 · 1106 bytes · __thiscall
_ZN12CChoreoScene5ThinkEf
Decompiled
undefined (2 params)
/* CChoreoScene::Think(float) */
void __thiscall CChoreoScene::Think(CChoreoScene *this,float param_1)
{
float fVar1;
CChoreoEvent *pCVar2;
bool bVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int local_4c;
int local_48;
CChoreoEvent *local_44;
code *local_40;
int local_3c;
int local_38;
undefined4 local_34;
int local_30;
undefined4 local_2c;
int local_28;
int local_24;
undefined4 local_20;
*(undefined4 *)(this + 0x90) = 0;
fVar1 = *(float *)(this + 0x7c);
ClearPauseEventDependencies(this);
local_40 = EventLess;
local_3c = 0;
local_38 = 0;
local_34 = 0;
local_30 = -1;
local_2c = 0;
local_28 = -1;
local_24 = -1;
local_20 = 0;
if (0 < *(int *)(this + 0x10)) {
iVar6 = 0;
LAB_00bb6ee0:
do {
pCVar2 = *(CChoreoEvent **)(*(int *)(this + 4) + iVar6 * 4);
if (pCVar2 != (CChoreoEvent *)0x0) {
/* try { // try from 00bb6f1b to 00bb7168 has its CatchHandler @ 00bb72c9 */
iVar4 = EventThink(this,pCVar2,*(float *)(this + 0x7c),param_1,0.0 <= param_1 - fVar1,
(PROCESSING_TYPE *)&local_4c);
*(int *)(this + 0x90) = *(int *)(this + 0x90) + iVar4;
if (local_4c != 0) {
local_48 = local_4c;
local_44 = pCVar2;
CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Insert((CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
*)&local_40,(ActiveList *)&local_48);
iVar6 = iVar6 + 1;
if (*(int *)(this + 0x10) <= iVar6) break;
goto LAB_00bb6ee0;
}
}
iVar6 = iVar6 + 1;
} while (iVar6 < *(int *)(this + 0x10));
}
iVar6 = local_30;
if (CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel == '\0') goto LAB_00bb6f9a;
LAB_00bb6f60:
if (iVar6 == -1) goto LAB_00bb6fe0;
while (iVar4 = iVar6, *(int *)(local_3c + iVar6 * 0x18) != -1) {
while( true ) {
if ((CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel), iVar6 != 0)) {
CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel = -1;
DAT_00f6d2d0 = 0xffffffff;
DAT_00f6d2d4 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel);
}
iVar6 = CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel;
if (iVar4 != -1) {
iVar6 = *(int *)(local_3c + iVar4 * 0x18);
}
if (CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel != '\0') goto LAB_00bb6f60;
LAB_00bb6f9a:
iVar4 = __cxa_guard_acquire(&CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_00bb6f60;
CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel = -1;
DAT_00f6d2d0 = 0xffffffff;
DAT_00f6d2d4 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel);
if (iVar6 != -1) break;
LAB_00bb6fe0:
iVar4 = iVar6;
if (CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel == -1) goto LAB_00bb6fea;
}
}
LAB_00bb6fea:
if (iVar6 != -1) {
do {
iVar4 = local_3c + iVar6 * 0x18;
iVar7 = *(int *)(iVar4 + 0x10);
if (iVar7 == 3) {
CChoreoEvent::ContinueProcessing
(*(IChoreoEventCallback **)(iVar4 + 0x14),*(CChoreoScene **)(this + 0xa0),
(float)this);
}
else if (iVar7 < 4) {
if (0 < iVar7) {
CChoreoEvent::StartProcessing
(*(IChoreoEventCallback **)(iVar4 + 0x14),*(CChoreoScene **)(this + 0xa0),
(float)this);
if (*(int *)(iVar4 + 0x10) == 2) {
CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>>::InsertBefore
((CUtlVector<CChoreoEvent*,CUtlMemory<CChoreoEvent*,int>> *)(this + 0x54),
*(int *)(this + 0x60),(CChoreoEvent **)(iVar4 + 0x14));
}
iVar7 = CChoreoEvent::GetType(*(CChoreoEvent **)(iVar4 + 0x14));
if (iVar7 == 1) {
if (*(int *)(this + 0x74) < 1) {
LAB_00bb713c:
iVar5 = -1;
}
else {
iVar5 = 0;
iVar7 = **(int **)(this + 0x68);
while (iVar7 != *(int *)(iVar4 + 0x14)) {
iVar5 = iVar5 + 1;
if (iVar5 == *(int *)(this + 0x74)) goto LAB_00bb713c;
iVar7 = (*(int **)(this + 0x68))[iVar5];
}
}
*(int *)(this + 0x210) = iVar5;
}
}
}
else if (iVar7 == 4) {
CChoreoEvent::StopProcessing
(*(CChoreoEvent **)(iVar4 + 0x14),*(IChoreoEventCallback **)(this + 0xa0),this,
*(float *)(this + 0x7c));
}
iVar6 = CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::NextInorder((CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
*)&local_40,iVar6);
} while (iVar6 != -1);
}
if (fVar1 == *(float *)(this + 0x7c)) {
*(float *)(this + 0x7c) = param_1;
}
if (*(int *)(this + 0x90) != 0) {
*(undefined4 *)(this + 0x98) = *(undefined4 *)(this + 0x7c);
}
if (local_24 != -1) {
iVar7 = 0;
iVar6 = local_24;
iVar4 = 0;
if (0 < local_38) {
do {
if (((-1 < iVar4) && (iVar4 < local_38)) && (iVar4 <= iVar6)) {
if ((CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel), iVar6 != 0)) {
CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel = -1;
DAT_00f6d2d0 = 0xffffffff;
DAT_00f6d2d4 = 0xffffffff;
__cxa_guard_release(&CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Links(int)::s_Sentinel);
}
iVar6 = local_24;
if (iVar4 != *(int *)(local_3c + iVar7)) {
((int *)(local_3c + iVar7))[1] = local_28;
*(int *)(local_3c + iVar7) = iVar4;
local_28 = iVar4;
}
}
} while (((iVar4 != iVar6) && (iVar4 + 1 < local_38)) &&
(iVar7 = iVar7 + 0x18, bVar3 = -2 < iVar4, iVar4 = iVar4 + 1, bVar3));
}
local_30 = -1;
local_2c = 0;
}
local_28 = 0xffffffff;
CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>::Purge
((CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int> *)&local_3c);
local_24 = 0xffffffff;
CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>::Purge
((CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int> *)&local_3c);
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.