SurvivorIntention::IsChargerImmediatelyDangerousTo
0x0094bdc0 · 365 bytes · __thiscall
_ZNK17SurvivorIntention31IsChargerImmediatelyDangerousToEPK13CTerrorPlayerP20CBaseCombatCharacter
Decompiled
undefined (3 params)
/* SurvivorIntention::IsChargerImmediatelyDangerousTo(CTerrorPlayer const*, CBaseCombatCharacter*)
const */
undefined4 __thiscall
SurvivorIntention::IsChargerImmediatelyDangerousTo
(SurvivorIntention *this,CTerrorPlayer *param_1,CBaseCombatCharacter *param_2)
{
float fVar1;
uint uVar2;
char cVar3;
undefined *puVar4;
undefined4 uVar5;
int iVar6;
int iVar7;
if (param_2 != (CBaseCombatCharacter *)0x0) {
cVar3 = (**(code **)(*(int *)param_2 + 0x16c))(param_2);
if (cVar3 != '\0') {
cVar3 = (**(code **)(*(int *)param_2 + 300))(param_2);
if (cVar3 != '\0') {
uVar2 = *(uint *)(param_2 + 0x3e44);
if ((((uVar2 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
iVar7 = *(int *)(*(int *)(puVar4 + 4) + 0x30);
if (iVar7 == 0) {
iVar7 = 0;
}
else {
iVar7 = iVar7 - *(int *)(gpGlobals + 0x58) >> 4;
}
if (*(int *)(param_1 + 0x30) == 0) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
return CONCAT31((int3)((uint)iVar6 >> 8),iVar7 == iVar6);
}
fVar1 = *(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)) < fVar1 * fVar1) {
/* WARNING: Could not recover jumptable at 0x0094bebf. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar5 = (**(code **)(*(int *)param_1 + 0x42c))();
return uVar5;
}
}
}
}
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.