CSceneEntity::PauseThink
0x0080ebd0 · 515 bytes · __thiscall
_ZN12CSceneEntity10PauseThinkEv
Decompiled
undefined (1 param)
/* CSceneEntity::PauseThink() */
void __thiscall CSceneEntity::PauseThink(CSceneEntity *this)
{
CSceneEntity CVar1;
int iVar2;
uint uVar3;
char cVar4;
undefined1 *puVar5;
undefined *puVar6;
float fVar7;
if (*(CChoreoScene **)(this + 0x4f0) == (CChoreoScene *)0x0) {
return;
}
if (this[0x6c4] != (CSceneEntity)0x0) {
return;
}
if (this[0x4bc] == (CSceneEntity)0x0) {
CVar1 = this[0x4ac];
}
else {
if (this[0x450] == (CSceneEntity)0x0) {
return;
}
uVar3 = *(uint *)(this + 0x44c);
if ((((uVar3 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar3 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
return;
}
CVar1 = this[0x4ac];
this[0x450] = (CSceneEntity)0x0;
}
if (CVar1 == (CSceneEntity)0x0) {
cVar4 = CChoreoScene::CheckEventCompletion(*(CChoreoScene **)(this + 0x4f0));
if (cVar4 == '\0') {
return;
}
if (*(int *)(this + 0x4b0) == 1) {
puVar5 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
puVar5 = *(undefined1 **)(this + 0x444);
}
Scene_Printf("%s : PauseThink canceling playback\n",puVar5);
(**(code **)(*(int *)this + 0x360))(this);
}
else {
(**(code **)(*(int *)this + 0x35c))(this);
}
}
else {
fVar7 = *(float *)(gpGlobals + 0x10) + *(float *)(this + 0x4b8);
*(float *)(this + 0x4b8) = fVar7;
if ((0.0 < *(float *)(this + 0x4b4)) && (fVar7 < *(float *)(this + 0x4b4))) {
return;
}
iVar2 = *(int *)(this + 0x4b0);
if (iVar2 == 1) {
puVar5 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
puVar5 = *(undefined1 **)(this + 0x444);
}
Scene_Printf("%s : Automatically canceling playback\n",puVar5);
(**(code **)(*(int *)this + 0x360))(this);
}
else if (iVar2 == 2) {
puVar5 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
puVar5 = *(undefined1 **)(this + 0x444);
}
Scene_Printf("%s : Automatically resuming playback\n",puVar5);
(**(code **)(*(int *)this + 0x35c))(this);
}
else {
puVar5 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
puVar5 = *(undefined1 **)(this + 0x444);
}
Scene_Printf("%s : Unknown action %i, automatically resuming playback\n",puVar5,iVar2);
(**(code **)(*(int *)this + 0x35c))(this);
}
}
this[0x4ac] = (CSceneEntity)0x0;
*(undefined4 *)(this + 0x4b0) = 0;
*(undefined4 *)(this + 0x4b8) = 0;
*(undefined4 *)(this + 0x4b4) = 0;
this[0x4bc] = (CSceneEntity)0x0;
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.