L L4D2node

CBaseCombatCharacter::SetDefaultRelationship

0x005f4640 · 47 bytes · __cdecl

_ZN20CBaseCombatCharacter22SetDefaultRelationshipE7Class_TS0_13Disposition_ti

Decompiled

undefined (4 params)

/* CBaseCombatCharacter::SetDefaultRelationship(Class_T, Class_T, Disposition_t, int) */

void CBaseCombatCharacter::SetDefaultRelationship
               (int param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  int *piVar1;
  
  if (m_DefaultRelationship != 0) {
    piVar1 = (int *)(m_DefaultRelationship + param_1 * 4);
    *(undefined4 *)(*piVar1 + 8 + param_2 * 0x10) = param_3;
    *(undefined4 *)(*piVar1 + 0xc + param_2 * 0x10) = param_4;
  }
  return;
}

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)