L L4D2node

SurvivorIntention::IsCommonImmediatelyDangerousTo

0x0094c1e0 · 442 bytes · __thiscall

_ZNK17SurvivorIntention30IsCommonImmediatelyDangerousToEPK13CTerrorPlayerP20CBaseCombatCharacter

Decompiled

undefined (3 params)

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

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

{
  char cVar1;
  int *piVar2;
  int *piVar3;
  undefined4 uVar4;
  
  if ((0 < *(int *)(TheDirector + 0x1c0)) ||
     (cVar1 = CTerrorPlayer::IsBeingHeroic(param_1), cVar1 != '\0')) {
    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 (1296.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))) {
      return 0;
    }
  }
  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)) <= 10000.0) &&
     (piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x14c))(param_2), piVar2 != (int *)0x0)) {
    piVar3 = (int *)(**(code **)(*piVar2 + 0x594))(piVar2);
    cVar1 = (**(code **)(*piVar3 + 0x114))(piVar3,2);
    if (cVar1 != '\0') {
      piVar2 = (int *)(**(code **)(*piVar2 + 0x59c))(piVar2);
      cVar1 = (**(code **)(*piVar2 + 0x100))(piVar2,param_1,0x3f000000);
      if (cVar1 != '\0') {
                    /* WARNING: Could not recover jumptable at 0x0094c355. Too many branches */
                    /* WARNING: Treating indirect jump as call */
        uVar4 = (**(code **)(*(int *)param_1 + 0x42c))();
        return uVar4;
      }
    }
  }
  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)