L L4D2node

SurvivorIntention::IsBoomerImmediatelyDangerousTo

0x0094b630 · 413 bytes · __thiscall

_ZNK17SurvivorIntention30IsBoomerImmediatelyDangerousToEPK13CTerrorPlayerP20CBaseCombatCharacter

Decompiled

undefined (3 params)

/* SurvivorIntention::IsBoomerImmediatelyDangerousTo(CTerrorPlayer const*, CBaseCombatCharacter*)
   const */

undefined4 __thiscall
SurvivorIntention::IsBoomerImmediatelyDangerousTo
          (SurvivorIntention *this,CTerrorPlayer *param_1,CBaseCombatCharacter *param_2)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  undefined *puVar4;
  undefined4 uVar5;
  float fVar6;
  
  if ((param_2 != (CBaseCombatCharacter *)0x0) &&
     (cVar3 = (**(code **)(*(int *)param_2 + 0x16c))(param_2), cVar3 != '\0')) {
    uVar1 = *(uint *)(param_2 + 0x30bc);
    if ((uVar1 == 0xffffffff) ||
       ((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc ||
        (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)))) {
      (**(code **)(*(int *)param_2 + 300))(param_2);
    }
    else {
      piVar2 = *(int **)(puVar4 + 4);
      cVar3 = (**(code **)(*(int *)param_2 + 300))(param_2);
      if ((cVar3 != '\0') && (piVar2 != (int *)0x0)) {
        if (((byte)param_2[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
        }
        if (((byte)param_1[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
        }
        fVar6 = SQRT((*(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)));
        if ((fVar6 < *(float *)(ZombieExplodingOuterRadius._28_4_ + 0x2c) * 1.2) &&
           (uVar5 = (**(code **)(*(int *)param_1 + 0x42c))(param_1,param_2,1), (char)uVar5 != '\0'))
        {
          return uVar5;
        }
        cVar3 = (**(code **)(*piVar2 + 0x32c))(piVar2);
        if (((cVar3 != '\0') || (cVar3 = (**(code **)(*piVar2 + 0x354))(piVar2), cVar3 != '\0')) &&
           (fVar6 < *(float *)(ZombieVomitRange._28_4_ + 0x2c) +
                    *(float *)(ZombieVomitRange._28_4_ + 0x2c))) {
                    /* WARNING: Could not recover jumptable at 0x0094b7a3. Too many branches */
                    /* WARNING: Treating indirect jump as call */
          uVar5 = (**(code **)(*(int *)param_1 + 0x42c))();
          return uVar5;
        }
      }
    }
  }
  return 0;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)