CHLTVDirector::FinishCameraManShot
0x006db730 · 347 bytes · __thiscall
_ZN13CHLTVDirector19FinishCameraManShotEv
Decompiled
undefined (1 param)
/* CHLTVDirector::FinishCameraManShot() */
void __thiscall CHLTVDirector::FinishCameraManShot(CHLTVDirector *this)
{
int iVar1;
uint uVar2;
char *pcVar3;
int *piVar4;
int iVar5;
uVar2 = FindFirstEvent(this,*(int *)(this + 0x1c));
if (uVar2 == 0xffff) {
*(int *)(this + 0x38) = *(int *)(this + 0x1c) + 1;
return;
}
iVar5 = (int)(4.0 / *(float *)(gpGlobals + 0x1c) + 0.5) + *(int *)(this + 0x1c);
*(int *)(this + 0x38) = iVar5;
while( true ) {
iVar1 = *(int *)(this + 0x1d4) + (uVar2 & 0xffff) * 0x14;
if (iVar5 <= *(int *)(iVar1 + 8)) break;
pcVar3 = (char *)(**(code **)(**(int **)(iVar1 + 0x10) + 8))(*(int **)(iVar1 + 0x10));
iVar5 = _V_strcmp(pcVar3,"hltv_cameraman");
if (iVar5 == 0) {
iVar5 = (**(code **)(**(int **)(iVar1 + 0x10) + 0x1c))(*(int **)(iVar1 + 0x10),"index",0);
if (iVar5 == 0) {
iVar5 = *(int *)(iVar1 + 8);
*(undefined4 *)(this + 0x30) = 0;
*(int *)(this + 0x38) = iVar5 + 1;
return;
}
}
uVar2 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
::NextInorder((CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
*)(this + 0x1d0),(ushort)uVar2);
uVar2 = uVar2 & 0xffff;
if (uVar2 == 0xffff) break;
iVar5 = *(int *)(this + 0x38);
}
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"hltv_cameraman",1,0);
if (piVar4 != (int *)0x0) {
(**(code **)(*piVar4 + 0x30))(piVar4,"index",*(undefined4 *)(this + 0x30));
(**(code **)(**(int **)(this + 0x14) + 0x2c))(*(int **)(this + 0x14),piVar4);
(**(code **)(*gameeventmanager + 0x2c))(gameeventmanager,piVar4);
}
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.