L L4D2node

z_play_activity

0x0051ec40 · 117 bytes · __cdecl

_ZL15z_play_activityRK8CCommand

Decompiled

undefined (1 param)

/* z_play_activity(CCommand const&) */

void z_play_activity(CCommand *param_1)

{
  CBasePlayer *pCVar1;
  int *piVar2;
  CBaseAnimating *this;
  char *pcVar3;
  int iVar4;
  
  pCVar1 = (CBasePlayer *)UTIL_GetCommandClient();
  piVar2 = (int *)FindPickerEntity(pCVar1);
  if (piVar2 != (int *)0x0) {
    this = (CBaseAnimating *)(**(code **)(*piVar2 + 0x14c))(piVar2);
    if (this != (CBaseAnimating *)0x0) {
      pcVar3 = "";
      if (1 < *(int *)param_1) {
        pcVar3 = *(char **)(param_1 + 0x40c);
      }
      iVar4 = CBaseAnimating::LookupActivity(this,pcVar3);
      if (iVar4 != -1) {
        iVar4 = (**(code **)(*(int *)this + 0x340))(this,iVar4);
        if (iVar4 != -1) {
          CBaseAnimating::SetSequence(this,iVar4);
        }
      }
    }
  }
  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)