CTerrorPlayer::StopRevivingSomeone
0x009a86d0 · 989 bytes · __thiscall
_ZN13CTerrorPlayer19StopRevivingSomeoneEb
Decompiled
undefined (2 params)
/* CTerrorPlayer::StopRevivingSomeone(bool) */
void __thiscall CTerrorPlayer::StopRevivingSomeone(CTerrorPlayer *this,bool param_1)
{
CBaseEdict *pCVar1;
CCSPlayer *this_00;
code *pcVar2;
int iVar3;
uint uVar4;
int *piVar5;
undefined4 uVar6;
char *pcVar7;
undefined4 *puVar8;
undefined *puVar9;
int iVar10;
CAI_Concept local_4c [8];
undefined4 local_44;
undefined4 local_40;
AI_CriteriaSet local_3c [44];
CCSPlayer::SetProgressBarTime((CCSPlayer *)this,0.0);
uVar4 = *(uint *)(this + 0x2e28);
if (uVar4 == 0xffffffff) {
uVar4 = 0xffffffff;
goto LAB_009a8729;
}
puVar9 = g_pEntityList + (uVar4 & 0xfff) * 0x10;
if (((puVar9 == (undefined *)0xfffffffc) || (*(uint *)(puVar9 + 8) != uVar4 >> 0xc)) ||
(this_00 = *(CCSPlayer **)(puVar9 + 4), this_00 == (CCSPlayer *)0x0)) goto LAB_009a8729;
(**(code **)(*(int *)this + 0x7fc))(this,0x2e,0);
(**(code **)(*(int *)this_00 + 0x7fc))(this_00,0x30,0);
if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar10 = 0;
}
else {
iVar10 = *(int *)(g_pEntityList + 4);
}
uVar4 = *(uint *)(this_00 + 0x2e24);
if (((uVar4 == 0xffffffff) ||
(puVar9 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar9 + 8) != uVar4 >> 0xc)) {
if (iVar10 != 0) goto LAB_009a8980;
}
else if (iVar10 != *(int *)(puVar9 + 4)) {
LAB_009a8980:
if (this_00[0x6c] == (CCSPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar10 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar10 + 2) = 0;
}
}
else {
this_00[0x70] = (CCSPlayer)((byte)this_00[0x70] | 1);
}
*(undefined4 *)(this_00 + 0x2e24) = 0;
}
CCSPlayer::SetProgressBarTime(this_00,0.0);
if (param_1) {
CBaseEntity::EmitSound((CBaseEntity *)this,"Player.StopVoice",0.0,(float *)0x0);
}
piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"revive_end",0,0);
if (piVar5 != (int *)0x0) {
pcVar2 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar2)(piVar5,"userid",uVar6);
pcVar2 = *(code **)(*piVar5 + 0x30);
uVar6 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this_00 + 0x30));
(*pcVar2)(piVar5,"subject",uVar6);
(**(code **)(*piVar5 + 0x2c))(piVar5,"ledge_hang",this_00[0x39f1]);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
}
if (param_1) {
AI_CriteriaSet::AI_CriteriaSet(local_3c);
/* try { // try from 009a89f4 to 009a8aa9 has its CatchHandler @ 009a8ae1 */
pcVar7 = (char *)SurvivorCharacterName(*(undefined4 *)(this + 0x2ba0));
AI_CriteriaSet::AppendCriteria(local_3c,"Subject",pcVar7,1.0);
pcVar7 = "1";
if (this_00[0x39f1] == (CCSPlayer)0x0) {
pcVar7 = "0";
}
AI_CriteriaSet::AppendCriteria(local_3c,"LedgeHang",pcVar7,1.0);
puVar8 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
uVar6 = *puVar8;
CAI_Concept::CAI_Concept(local_4c,"ReviveMeInterrupted");
local_44 = 2;
local_40 = uVar6;
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,local_4c,local_3c,
*(float *)(gpGlobals + 0xc) + 0.2,(CFollowupTargetSpec_t *)&local_44,
(CBaseEntity *)this);
AI_CriteriaSet::~AI_CriteriaSet(local_3c);
}
uVar4 = *(uint *)(this + 0x2e28);
LAB_009a8729:
if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar10 = 0;
}
else {
iVar10 = *(int *)(g_pEntityList + 4);
}
if (((uVar4 == 0xffffffff) ||
(puVar9 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar9 + 8) != uVar4 >> 0xc)) {
iVar3 = 0;
}
else {
iVar3 = *(int *)(puVar9 + 4);
}
if (iVar10 != iVar3) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar10 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar10 + 2) = 0;
}
*(undefined4 *)(this + 0x2e28) = 0;
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
*(undefined4 *)(this + 0x2e28) = 0;
}
StopUseActions(this);
return;
}
StopUseActions(this);
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.