L L4D2node

SurvivorIntention::IsJockeyImmediatelyDangerousTo

0x0094c050 · 365 bytes · __thiscall

_ZNK17SurvivorIntention30IsJockeyImmediatelyDangerousToEPK13CTerrorPlayerP20CBaseCombatCharacter

Decompiled

undefined (3 params)

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

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

{
  float fVar1;
  uint uVar2;
  char cVar3;
  undefined *puVar4;
  undefined4 uVar5;
  int iVar6;
  int iVar7;
  
  if (param_2 != (CBaseCombatCharacter *)0x0) {
    cVar3 = (**(code **)(*(int *)param_2 + 0x16c))(param_2);
    if (cVar3 != '\0') {
      cVar3 = (**(code **)(*(int *)param_2 + 300))(param_2);
      if (cVar3 != '\0') {
        uVar2 = *(uint *)(param_2 + 0x3edc);
        if ((((uVar2 != 0xffffffff) &&
             (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc))
            && (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
          iVar7 = *(int *)(*(int *)(puVar4 + 4) + 0x30);
          if (iVar7 == 0) {
            iVar7 = 0;
          }
          else {
            iVar7 = iVar7 - *(int *)(gpGlobals + 0x58) >> 4;
          }
          if (*(int *)(param_1 + 0x30) == 0) {
            iVar6 = 0;
          }
          else {
            iVar6 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
          }
          return CONCAT31((int3)((uint)iVar6 >> 8),iVar7 == iVar6);
        }
        fVar1 = *(float *)(JockeyLeapRange._28_4_ + 0x2c);
        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)) < fVar1 * fVar1) {
                    /* WARNING: Could not recover jumptable at 0x0094c14f. 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)