CSceneEntity::CheckActors
0x00814840 · 685 bytes · __thiscall
_ZN12CSceneEntity11CheckActorsEv
Decompiled
undefined (1 param)
/* CSceneEntity::CheckActors() */
undefined4 __thiscall CSceneEntity::CheckActors(CSceneEntity *this)
{
char cVar1;
int iVar2;
CBaseFlex *this_00;
int iVar3;
int *piVar4;
undefined4 uVar5;
CChoreoActor *this_01;
char *pcVar6;
CChoreoEvent *this_02;
CChoreoActor *pCVar7;
CBaseFlex *pCVar8;
CSceneManager *pCVar9;
int iVar10;
int iVar11;
char local_20;
if (*(CChoreoScene **)(this + 0x4f0) == (CChoreoScene *)0x0) {
return 0;
}
iVar2 = CChoreoScene::GetNumActors(*(CChoreoScene **)(this + 0x4f0));
if (iVar2 < 1) {
return 1;
}
iVar10 = 0;
do {
while ((this_00 = (CBaseFlex *)(**(code **)(*(int *)this + 0x3dc))(this,iVar10),
this_00 == (CBaseFlex *)0x0 ||
(iVar3 = (**(code **)(*(int *)this_00 + 0x144))(this_00), iVar3 == 0))) {
LAB_00814991:
iVar10 = iVar10 + 1;
if (iVar10 == iVar2) {
return 1;
}
}
piVar4 = (int *)(**(code **)(*(int *)this_00 + 0x144))(this_00);
uVar5 = (**(code **)(*piVar4 + 300))(piVar4);
if ((char)uVar5 != '\0') {
if (*(int *)(this + 0x708) == 1) {
pCVar8 = (CBaseFlex *)CBaseEntity::MyNPCPointer();
if (pCVar8 != (CBaseFlex *)0x0) {
local_20 = '\0';
if (*(int *)(hl2_episodic._28_4_ + 0x30) != 0) {
pCVar9 = (CSceneManager *)GetSceneManager();
local_20 = CSceneManager::IsRunningScriptedSceneWithSpeech(pCVar9,pCVar8,false);
}
iVar3 = (**(code **)(*(int *)pCVar8 + 0x768))(pCVar8);
if (iVar3 != 0) {
piVar4 = (int *)(**(code **)(*(int *)pCVar8 + 0x768))(pCVar8);
cVar1 = (**(code **)(*piVar4 + 0x10))(piVar4);
if (cVar1 != '\0') goto LAB_00814a1e;
}
if (local_20 != '\0') {
LAB_00814a1e:
this[0x4bd] = (CSceneEntity)0x1;
return 0;
}
}
}
else if (*(int *)(this + 0x708) - 2U < 2) {
pCVar8 = (CBaseFlex *)(**(code **)(*(int *)this_00 + 0x144))(this_00);
if (pCVar8 != (CBaseFlex *)0x0) {
pCVar9 = (CSceneManager *)GetSceneManager();
uVar5 = CSceneManager::IsInInterruptableScenes(pCVar9,pCVar8);
if ((char)uVar5 == '\0') {
this[0x4be] = (CSceneEntity)0x1;
return uVar5;
}
}
if (*(int *)(this + 0x708) == 3) {
pCVar9 = (CSceneManager *)GetSceneManager();
CSceneManager::RemoveActorFromScenes(pCVar9,pCVar8,false,false,(char *)0x0);
}
else {
pCVar9 = (CSceneManager *)GetSceneManager();
CSceneManager::PauseActorsScenes(pCVar9,pCVar8,false);
this[0x4bf] = (CSceneEntity)0x1;
}
}
CBaseFlex::StartChoreoScene(this_00,*(CChoreoScene **)(this + 0x4f0));
goto LAB_00814991;
}
if (iVar2 == 1) {
return 0;
}
this_01 = (CChoreoActor *)CChoreoScene::GetActor(*(CChoreoScene **)(this + 0x4f0),iVar10);
if (this_01 == (CChoreoActor *)0x0) {
return uVar5;
}
pcVar6 = (char *)CChoreoActor::GetName(this_01);
if ((pcVar6 != "Gambler") && (iVar3 = _V_stricmp(pcVar6,"Gambler"), iVar3 != 0)) {
return uVar5;
}
iVar3 = CChoreoScene::GetNumEvents(*(CChoreoScene **)(this + 0x4f0));
if (iVar3 < 1) goto LAB_00814991;
iVar11 = 0;
do {
this_02 = (CChoreoEvent *)CChoreoScene::GetEvent(*(CChoreoScene **)(this + 0x4f0),iVar11);
pCVar7 = (CChoreoActor *)CChoreoEvent::GetActor(this_02);
if (this_01 == pCVar7) {
return 0;
}
iVar11 = iVar11 + 1;
} while (iVar11 != iVar3);
iVar10 = iVar10 + 1;
if (iVar10 == iVar2) {
return 1;
}
} while( true );
}
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.