GCSDK::CGCBase::StopPlaying
0x0007aef0 · 364 bytes · __thiscall
_ZN5GCSDK7CGCBase11StopPlayingERK8CSteamID
Decompiled
undefined (2 params)
/* GCSDK::CGCBase::StopPlaying(CSteamID const&) */
void __thiscall GCSDK::CGCBase::StopPlaying(CGCBase *this,CSteamID *param_1)
{
CGCUserSession *pCVar1;
ushort uVar2;
int iVar3;
ushort *puVar4;
uint uVar5;
undefined4 local_28;
undefined4 local_24;
local_24 = *(undefined4 *)(param_1 + 4);
local_28 = *(undefined4 *)param_1;
uVar2 = CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x13c),(Node_t *)&local_28);
uVar5 = (uint)uVar2;
if (((int)uVar5 < *(int *)(this + 0x144)) && (uVar2 <= *(ushort *)(this + 0x152))) {
if (CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
DAT_000d286a = 0xffff;
CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d286c = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
}
if (uVar2 == 0xffff) {
puVar4 = &CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
else {
puVar4 = (ushort *)(*(int *)(this + 0x140) + uVar5 * 0x14);
}
if (uVar2 != *puVar4) {
iVar3 = uVar5 * 0x14;
pCVar1 = *(CGCUserSession **)(*(int *)(this + 0x140) + 0x10 + iVar3);
(**(code **)(*(int *)this + 0x4c))(this,pCVar1);
if (*(CGCGSSession **)(pCVar1 + 0xc) != (CGCGSSession *)0x0) {
CGCGSSession::RemoveUser(*(CGCGSSession **)(pCVar1 + 0xc),pCVar1);
}
if (uVar2 != 0xffff) {
CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Unlink((CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(this + 0x13c),uVar2);
*(ushort *)(*(int *)(this + 0x140) + iVar3) = uVar2;
*(undefined2 *)(*(int *)(this + 0x140) + 2 + iVar3) = *(undefined2 *)(this + 0x150);
*(short *)(this + 0x14e) = *(short *)(this + 0x14e) + -1;
*(ushort *)(this + 0x150) = uVar2;
}
operator_delete(pCVar1);
return;
}
}
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.