SurvivorIntention::IsTankImmediatelyDangerousTo
0x0094b360 · 512 bytes · __thiscall
_ZNK17SurvivorIntention28IsTankImmediatelyDangerousToEPK13CTerrorPlayerP20CBaseCombatCharacter
Decompiled
undefined (3 params)
/* SurvivorIntention::IsTankImmediatelyDangerousTo(CTerrorPlayer const*, CBaseCombatCharacter*)
const */
uint __thiscall
SurvivorIntention::IsTankImmediatelyDangerousTo
(SurvivorIntention *this,CTerrorPlayer *param_1,CBaseCombatCharacter *param_2)
{
uint uVar1;
int *piVar2;
char cVar3;
int iVar4;
undefined *puVar5;
if ((param_2 == (CBaseCombatCharacter *)0x0) ||
(cVar3 = (**(code **)(*(int *)param_2 + 0x16c))(param_2), cVar3 == '\0')) {
param_2 = (CBaseCombatCharacter *)0x0;
}
uVar1 = *(uint *)(param_2 + 0x30bc);
if ((((uVar1 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) ||
(((piVar2 = *(int **)(puVar5 + 4), piVar2 == (int *)0x0 ||
(cVar3 = (**(code **)(*piVar2 + 0x354))(piVar2), cVar3 == '\0')) ||
(cVar3 = (**(code **)(*(int *)param_1 + 0x42c))(param_1,param_2,1), cVar3 == '\0')))) {
if (((byte)*(CBaseEntity *)(param_2 + 0x14d) & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
if (90000.0 <=
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) *
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) +
(*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) *
(*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) +
(*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) *
(*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4))) {
cVar3 = (**(code **)(*(int *)param_2 + 0x41c))(param_2,param_1,0x3f333333);
if (cVar3 == '\0') {
return 0;
}
if (((byte)*(CBaseEntity *)(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 + 0x2e8) - *(float *)(param_2 + 0x2e8)) *
(*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) +
(*(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)) <= 562500.0) {
iVar4 = (**(code **)(*(int *)param_2 + 0x52c))(param_2);
if (iVar4 != 0) {
return (int)(uint)*(byte *)(iVar4 + 0x7d) >>
((byte)*(undefined4 *)(param_1 + 0x2ba0) & 0x1f) & 1;
}
return 0;
}
return 0;
}
}
return 1;
}
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.