L L4D2node

AscertainSpeechSubjectFromContext

0x005b0df0 · 119 bytes · __regparm3

_ZL33AscertainSpeechSubjectFromContextP11AI_ResponseR14AI_CriteriaSetPKc.isra.0

Decompiled

undefined (3 params)

/* AscertainSpeechSubjectFromContext(AI_Response*, AI_CriteriaSet&, char const*) [clone .isra.0] */

int __regparm3
AscertainSpeechSubjectFromContext(AI_Response *param_1,AI_CriteriaSet *param_2,char *param_3)

{
  int iVar1;
  char *pcVar2;
  
  iVar1 = AI_CriteriaSet::FindCriterionIndex((AI_CriteriaSet *)param_1,(char *)param_2);
  pcVar2 = (char *)AI_CriteriaSet::GetValue((AI_CriteriaSet *)param_1,iVar1);
  if (pcVar2 == (char *)0x0) {
    iVar1 = 0;
  }
  else {
    iVar1 = TerrorGetPlayerPointerFromCharacterName(pcVar2);
    if (iVar1 == 0) {
      iVar1 = CGlobalEntityList::FindEntityByName
                        ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar2,(CBaseEntity *)0x0,
                         (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
    }
  }
  return iVar1;
}

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)