L L4D2node

CTerrorPlayer::SelectWeightedSequence

0x00998770 · 105 bytes · __thiscall

_ZN13CTerrorPlayer22SelectWeightedSequenceE8Activity

Decompiled

undefined (2 params)

/* CTerrorPlayer::SelectWeightedSequence(Activity) */

void __thiscall CTerrorPlayer::SelectWeightedSequence(CTerrorPlayer *this,int param_2)

{
  char cVar1;
  int iVar2;
  
  if (param_2 == 0x316) {
    iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
    if (iVar2 == 3) {
      iVar2 = (**(code **)(*(int *)this + 0x544))(this);
      if (iVar2 == 8) {
        cVar1 = CTerrorGameRules::HasPlayerControlledZombies();
        if (cVar1 != '\0') {
          iVar2 = CBaseAnimating::LookupSequence((CBaseAnimating *)this,"Hulk_RunAttack1_Gesture");
          if (iVar2 != -1) {
            return;
          }
        }
      }
    }
  }
  CBaseAnimating::SelectWeightedSequence();
  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)