L L4D2node

CRagdollProp::HasPhysgunInteraction

0x00797010 · 274 bytes · __thiscall

_ZN12CRagdollProp21HasPhysgunInteractionEPKcS1_

Decompiled

undefined (3 params)

/* CRagdollProp::HasPhysgunInteraction(char const*, char const*) */

undefined4 __thiscall
CRagdollProp::HasPhysgunInteraction(CRagdollProp *this,char *param_1,char *param_2)

{
  code *pcVar1;
  KeyValues *pKVar2;
  undefined4 uVar3;
  char *pcVar4;
  char *pcVar5;
  int iVar6;
  uint in_stack_ffffffc8;
  
  pKVar2 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffc8);
                    /* try { // try from 00797042 to 00797046 has its CatchHandler @ 00797125 */
  KeyValues::KeyValues(pKVar2,"",(IKeyValuesSystem *)0x0,false);
  pcVar1 = *(code **)(*modelinfo + 0x54);
  uVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
  pcVar4 = (char *)(*pcVar1)(modelinfo,uVar3);
  pcVar1 = *(code **)(*modelinfo + 0x10);
  uVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
  pcVar5 = (char *)(*pcVar1)(modelinfo,uVar3);
  uVar3 = KeyValues::LoadFromBuffer(pKVar2,pcVar5,pcVar4,(IBaseFileSystem *)0x0,(char *)0x0);
  if (((((char)uVar3 != '\0') &&
       (pKVar2 = (KeyValues *)KeyValues::FindKey(pKVar2,"physgun_interactions",false),
       pKVar2 != (KeyValues *)0x0)) &&
      (pcVar4 = (char *)KeyValues::GetString(pKVar2,param_1,""), pcVar4 != (char *)0x0)) &&
     ((*pcVar4 != '\0' && (iVar6 = _V_stricmp(pcVar4,param_2), iVar6 == 0)))) {
    KeyValues::deleteThis();
    return uVar3;
  }
  KeyValues::deleteThis();
  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)