SurvivorIntention::IsSmokerImmediatelyDangerousTo
0x0094b7e0 · 744 bytes · __thiscall
_ZNK17SurvivorIntention30IsSmokerImmediatelyDangerousToEPK13CTerrorPlayerP20CBaseCombatCharacter
Decompiled
undefined (3 params)
/* SurvivorIntention::IsSmokerImmediatelyDangerousTo(CTerrorPlayer const*, CBaseCombatCharacter*)
const */
undefined4 __thiscall
SurvivorIntention::IsSmokerImmediatelyDangerousTo
(SurvivorIntention *this,CTerrorPlayer *param_1,CBaseCombatCharacter *param_2)
{
uint uVar1;
int *piVar2;
char cVar3;
undefined4 uVar4;
int iVar5;
undefined *puVar6;
int iVar7;
float fVar8;
uVar1 = *(uint *)(param_1 + 0x33c4);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
return 1;
}
if (((param_2 != (CBaseCombatCharacter *)0x0) &&
(cVar3 = (**(code **)(*(int *)param_2 + 0x16c))(param_2), cVar3 != '\0')) &&
(cVar3 = (**(code **)(*(int *)param_2 + 300))(param_2), cVar3 != '\0')) {
uVar1 = *(uint *)(param_2 + 0x33c0);
if (((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar1 >> 0xc && (*(int *)(puVar6 + 4) != 0)))) {
iVar7 = *(int *)(*(int *)(puVar6 + 4) + 0x30);
if (iVar7 == 0) {
iVar7 = 0;
}
else {
iVar7 = iVar7 - *(int *)(gpGlobals + 0x58) >> 4;
}
if (*(int *)(param_1 + 0x30) == 0) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
return CONCAT31((int3)((uint)iVar5 >> 8),iVar7 == iVar5);
}
uVar1 = *(uint *)(param_2 + 0x30bc);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
(piVar2 = *(int **)(puVar6 + 4), piVar2 != (int *)0x0)) {
cVar3 = (**(code **)(*piVar2 + 0x32c))(piVar2);
if ((cVar3 != '\0') || (cVar3 = (**(code **)(*piVar2 + 0x354))(piVar2), cVar3 != '\0')) {
fVar8 = *(float *)(TongueRange._28_4_ + 0x2c);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
fVar8 = fVar8 * 1.25;
if (((*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) *
(*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) +
(*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) *
(*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) +
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) *
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) < fVar8 * fVar8) &&
(cVar3 = (**(code **)(*(int *)param_1 + 0x42c))(param_1,param_2,1), cVar3 != '\0')) {
return 1;
}
}
fVar8 = *(float *)(SurvivorBotThreatMediumRange._28_4_ + 0x2c);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
if ((*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) *
(*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) +
(*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) *
(*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) +
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) *
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) < fVar8 * fVar8) {
/* WARNING: Could not recover jumptable at 0x0094b9d7. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (**(code **)(*(int *)param_1 + 0x42c))();
return uVar4;
}
}
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.