L L4D2node

CBaseAnimatingOverlay::AddGesture

0x005edfb0 · 240 bytes · __thiscall

_ZN21CBaseAnimatingOverlay10AddGestureE8Activityb

Decompiled

undefined (3 params)

/* CBaseAnimatingOverlay::AddGesture(Activity, bool) */

int __thiscall
CBaseAnimatingOverlay::AddGesture(CBaseAnimatingOverlay *this,int param_2,bool param_3)

{
  code *pcVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  undefined4 *puVar5;
  
  iVar3 = FindGestureLayer();
  piVar2 = mdlcache;
  if (iVar3 != -1) {
    return iVar3;
  }
  (**(code **)(*mdlcache + 0x68))();
                    /* try { // try from 005ee000 to 005ee021 has its CatchHandler @ 005ee0a8 */
  iVar3 = (**(code **)(*(int *)this + 0x340))();
  if (iVar3 < 1) {
                    /* try { // try from 005ee066 to 005ee0a5 has its CatchHandler @ 005ee0a8 */
    CAI_BaseNPC::GetActivityName(param_2);
    (**(code **)(*(int *)this + 0x20))();
    puVar5 = (undefined4 *)&stack0xffffffd0;
    DevMsg("CBaseAnimatingOverlay::AddGesture:  model %s missing activity %s\n");
    iVar3 = -1;
  }
  else {
    iVar4 = AddGestureSequence(this,iVar3,param_3);
    iVar3 = -1;
    puVar5 = (undefined4 *)&stack0xffffffd4;
    if (iVar4 != -1) {
      *(int *)(iVar4 * 0x4c + *(int *)(this + 0x13f4) + 0x34) = param_2;
      iVar3 = iVar4;
      puVar5 = (undefined4 *)&stack0xffffffd4;
    }
  }
  iVar4 = *piVar2;
  *puVar5 = piVar2;
  pcVar1 = *(code **)(iVar4 + 0x6c);
  puVar5[-1] = 0x5ee04f;
  (*pcVar1)();
  return iVar3;
}

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)