L4D1SurvivorBehavior::SelectTargetPoint
0x00922620 · 744 bytes · __cdecl
_ZNK20L4D1SurvivorBehavior17SelectTargetPointEPK8INextBotPK20CBaseCombatCharacter
Decompiled
undefined (2 params)
/* L4D1SurvivorBehavior::SelectTargetPoint(INextBot const*, CBaseCombatCharacter const*) const */
INextBot * L4D1SurvivorBehavior::SelectTargetPoint(INextBot *param_1,CBaseCombatCharacter *param_2)
{
undefined4 uVar1;
undefined4 uVar2;
float fVar3;
uint uVar4;
char cVar5;
int iVar6;
Infected *this;
int *piVar7;
undefined *puVar8;
float fVar9;
CBaseEntity *in_stack_00000010;
Vector local_4c [8];
float local_44;
Vector local_40 [8];
float local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
QAngle local_28 [24];
if (in_stack_00000010 == (CBaseEntity *)0x0) {
*(undefined4 *)param_1 = vec3_origin;
*(undefined4 *)(param_1 + 4) = DAT_01053d4c;
*(undefined4 *)(param_1 + 8) = DAT_01053d50;
return param_1;
}
if (((byte)in_stack_00000010[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(in_stack_00000010);
}
uVar1 = *(undefined4 *)(in_stack_00000010 + 0x2e0);
uVar2 = *(undefined4 *)(in_stack_00000010 + 0x2e4);
fVar3 = *(float *)(in_stack_00000010 + 0x2e8);
CCollisionProperty::CollisionAABBToWorldAABB
((CCollisionProperty *)(in_stack_00000010 + 0x194),(Vector *)(in_stack_00000010 + 0x19c)
,(Vector *)(in_stack_00000010 + 0x1a8),local_4c,local_40);
iVar6 = CBaseEntity::GetTeamNumber(in_stack_00000010);
if (((iVar6 == 3) && (iVar6 = (**(code **)(*(int *)in_stack_00000010 + 0x544))(), iVar6 == 7)) ||
((iVar6 = CBaseEntity::GetTeamNumber(in_stack_00000010), iVar6 == 3 &&
(iVar6 = (**(code **)(*(int *)in_stack_00000010 + 0x544))(), iVar6 == 3)))) {
LAB_009227d3:
fVar9 = 0.25;
}
else {
iVar6 = CBaseEntity::GetTeamNumber(in_stack_00000010);
if ((iVar6 == 3) && (iVar6 = (**(code **)(*(int *)in_stack_00000010 + 0x544))(), iVar6 == 5)) {
cVar5 = (**(code **)(*(int *)in_stack_00000010 + 0x16c))();
if ((cVar5 != '\0') &&
((((uVar4 = *(uint *)(in_stack_00000010 + 0x3edc), uVar4 == 0xffffffff ||
(puVar8 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar4 >> 0xc)) || (*(int *)(puVar8 + 4) == 0))))
goto LAB_009227d3;
}
else {
iVar6 = (**(code **)(*(int *)in_stack_00000010 + 0x14c))();
if (iVar6 != 0) {
this = (Infected *)(**(code **)(*(int *)in_stack_00000010 + 0x14c))();
cVar5 = Infected::IsStumbling(this);
piVar7 = mdlcache;
if (cVar5 != '\0') {
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 009228b7 to 009228bb has its CatchHandler @ 00922931 */
CBaseAnimating::GetAttachment
((CBaseAnimating *)in_stack_00000010,"Head",(Vector *)&local_34,local_28);
*(undefined4 *)param_1 = local_34;
*(undefined4 *)(param_1 + 4) = local_30;
*(undefined4 *)(param_1 + 8) = local_2c;
(**(code **)(*piVar7 + 0x6c))(piVar7);
return param_1;
}
piVar7 = (int *)(**(code **)(*(int *)this + 0x590))(this);
cVar5 = (**(code **)(*piVar7 + 0xd4))(piVar7);
piVar7 = mdlcache;
if (cVar5 != '\0') {
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 00922743 to 00922747 has its CatchHandler @ 00922943 */
CBaseAnimating::GetAttachment
((CBaseAnimating *)in_stack_00000010,"Head",(Vector *)&local_34,local_28);
*(undefined4 *)param_1 = local_34;
*(undefined4 *)(param_1 + 4) = local_30;
*(undefined4 *)(param_1 + 8) = local_2c;
(**(code **)(*piVar7 + 0x6c))(piVar7);
return param_1;
}
piVar7 = (int *)(**(code **)(*(int *)this + 0x594))(this);
iVar6 = (**(code **)(*piVar7 + 0xfc))(piVar7);
if (iVar6 < 3) {
fVar9 = 0.5;
if ((0 < iVar6) || (fVar9 = 0.6, iVar6 == 0)) goto LAB_009227db;
}
else {
fVar9 = 0.25;
if (iVar6 == 4) goto LAB_009227db;
}
}
}
fVar9 = 0.85;
}
LAB_009227db:
*(undefined4 *)param_1 = uVar1;
*(undefined4 *)(param_1 + 4) = uVar2;
*(float *)(param_1 + 8) = (local_38 - local_44) * fVar9 + fVar3;
return param_1;
}
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.