IIntention::SelectMoreDangerousThreat
0x007533f0 · 431 bytes · __thiscall
_ZNK10IIntention25SelectMoreDangerousThreatEPK8INextBotPK20CBaseCombatCharacterPS3_S6_
Decompiled
undefined (5 params)
/* IIntention::SelectMoreDangerousThreat(INextBot const*, CBaseCombatCharacter const*,
CBaseCombatCharacter*, CBaseCombatCharacter*) const */
CBaseCombatCharacter * __thiscall
IIntention::SelectMoreDangerousThreat
(IIntention *this,INextBot *param_1,CBaseCombatCharacter *param_2,
CBaseCombatCharacter *param_3,CBaseCombatCharacter *param_4)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
CBaseCombatCharacter CVar7;
int iVar8;
int *piVar9;
CBaseCombatCharacter *pCVar10;
iVar8 = (**(code **)(*(int *)this + 8))(this);
while( true ) {
if (iVar8 == 0) {
if (((byte)param_3[0x14d] & 8) == 0) {
CVar7 = param_2[0x14d];
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_3);
CVar7 = param_2[0x14d];
}
if (((byte)CVar7 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
fVar1 = *(float *)(param_2 + 0x2e4);
fVar2 = *(float *)(param_2 + 0x2e8);
fVar3 = *(float *)(param_2 + 0x2e0);
fVar4 = *(float *)(param_3 + 0x2e4);
fVar5 = *(float *)(param_3 + 0x2e8);
fVar6 = *(float *)(param_3 + 0x2e0);
if (((byte)param_4[0x14d] & 8) == 0) {
CVar7 = param_2[0x14d];
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_4);
CVar7 = param_2[0x14d];
}
if (((byte)CVar7 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
if ((fVar2 - fVar5) * (fVar2 - fVar5) + (fVar1 - fVar4) * (fVar1 - fVar4) +
(fVar3 - fVar6) * (fVar3 - fVar6) <
(*(float *)(param_2 + 0x2e0) - *(float *)(param_4 + 0x2e0)) *
(*(float *)(param_2 + 0x2e0) - *(float *)(param_4 + 0x2e0)) +
(*(float *)(param_2 + 0x2e8) - *(float *)(param_4 + 0x2e8)) *
(*(float *)(param_2 + 0x2e8) - *(float *)(param_4 + 0x2e8)) +
(*(float *)(param_2 + 0x2e4) - *(float *)(param_4 + 0x2e4)) *
(*(float *)(param_2 + 0x2e4) - *(float *)(param_4 + 0x2e4))) {
param_4 = param_3;
}
return param_4;
}
piVar9 = (int *)__dynamic_cast(iVar8,&INextBotEventResponder::typeinfo,
&IContextualQuery::typeinfo,0xfffffffe);
if ((piVar9 != (int *)0x0) &&
(pCVar10 = (CBaseCombatCharacter *)
(**(code **)(*piVar9 + 0x20))(piVar9,param_1,param_2,param_3,param_4),
pCVar10 != (CBaseCombatCharacter *)0x0)) break;
iVar8 = (**(code **)(*(int *)this + 0xc))(this,iVar8);
}
return pCVar10;
}
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.