L L4D2node

CResponseSystem::RecursiveScoreSubcriteriaAgainstRule

0x005b8790 · 248 bytes · __thiscall

_ZN15CResponseSystem36RecursiveScoreSubcriteriaAgainstRuleERK14AI_CriteriaSetP8CriteriaRbb

Decompiled

undefined (5 params)

/* CResponseSystem::RecursiveScoreSubcriteriaAgainstRule(AI_CriteriaSet const&, Criteria*, bool&,
   bool) */

longdouble __thiscall
CResponseSystem::RecursiveScoreSubcriteriaAgainstRule
          (CResponseSystem *this,AI_CriteriaSet *param_1,Criteria *param_2,bool *param_3,
          bool param_4)

{
  ushort uVar1;
  int iVar2;
  bool bVar3;
  int iVar4;
  longdouble lVar5;
  float local_30;
  bool local_1d [13];
  
  iVar2 = *(int *)(param_2 + 0x1e);
  if (iVar2 < 1) {
    if (param_2[8] != (Criteria)0x0) {
      bVar3 = true;
      local_30 = 0.0;
      goto LAB_005b8845;
    }
    local_30 = 0.0;
  }
  else {
    iVar4 = 0;
    local_30 = 0.0;
    do {
      uVar1 = *(ushort *)(*(int *)(param_2 + 0x16) + iVar4);
      local_1d[0] = false;
      if (param_4) {
        DevMsg("\n");
      }
      iVar4 = iVar4 + 2;
      lVar5 = (longdouble)
              ScoreCriteriaAgainstRuleCriteria(this,param_1,(uint)uVar1,local_1d,param_4);
      local_30 = (float)lVar5 + local_30;
    } while (iVar4 != iVar2 * 2);
    if ((param_2[8] != (Criteria)0x0) && (bVar3 = true, local_30 == 0.0)) goto LAB_005b8845;
  }
  bVar3 = false;
LAB_005b8845:
  *param_3 = bVar3;
  lVar5 = (longdouble)float16::Convert16bitFloatTo32bits(*(ushort *)(param_2 + 6));
  return (longdouble)((float)lVar5 * local_30);
}

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)