L L4D2node

CFirstAidKit::ShouldContinueAction

0x00536f70 · 435 bytes · __thiscall

_ZN12CFirstAidKit20ShouldContinueActionEP13CTerrorPlayerP11CBaseEntityi

Decompiled

undefined (4 params)

/* CFirstAidKit::ShouldContinueAction(CTerrorPlayer*, CBaseEntity*, int) */

undefined4 __thiscall
CFirstAidKit::ShouldContinueAction
          (CFirstAidKit *this,CTerrorPlayer *param_1,CBaseEntity *param_2,int param_3)

{
  code *pcVar1;
  char cVar2;
  undefined4 uVar3;
  int *piVar4;
  undefined4 uVar5;
  char *pcVar6;
  undefined4 *puVar7;
  undefined4 local_50;
  CAI_Concept local_4c [8];
  undefined4 local_44;
  undefined4 local_40;
  AI_CriteriaSet local_3c [44];
  
  uVar3 = CBaseBackpackItem::ShouldContinueAction((CBaseBackpackItem *)this,param_1,param_2,param_3)
  ;
  if ((char)uVar3 == '\0') {
    if ((param_2 == (CBaseEntity *)0x0) ||
       (cVar2 = (**(code **)(*(int *)param_2 + 0x16c))(param_2), cVar2 == '\0')) {
      param_2 = (CBaseEntity *)0x0;
    }
    piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"heal_interrupted",0,0)
    ;
    if (piVar4 != (int *)0x0) {
      pcVar1 = *(code **)(*piVar4 + 0x30);
      uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
      (*pcVar1)(piVar4,"userid",uVar5);
      pcVar1 = *(code **)(*piVar4 + 0x30);
      uVar5 = (**(code **)(*engine + 0x40))(engine,*(int *)(param_2 + 0x30));
      (*pcVar1)(piVar4,"subject",uVar5);
      (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
    }
    AI_CriteriaSet::AI_CriteriaSet(local_3c);
                    /* try { // try from 0053707c to 00537100 has its CatchHandler @ 00537129 */
    pcVar6 = (char *)SurvivorCharacterName(*(undefined4 *)(param_1 + 0x2ba0));
    AI_CriteriaSet::AppendCriteria(local_3c,"Subject",pcVar6,1.0);
    if (param_2 == (CBaseEntity *)0x0) {
      local_50 = 0xffffffff;
    }
    else {
      puVar7 = (undefined4 *)(**(code **)(*(int *)param_2 + 0xc))(param_2);
      local_50 = *puVar7;
    }
    CAI_Concept::CAI_Concept(local_4c,"HealMeInterrupted");
    local_44 = 2;
    local_40 = local_50;
    CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,local_4c,local_3c,
                        *(float *)(gpGlobals + 0xc),(CFollowupTargetSpec_t *)&local_44,
                        (CBaseEntity *)param_1);
    AI_CriteriaSet::~AI_CriteriaSet(local_3c);
    return uVar3;
  }
  return uVar3;
}

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)