L L4D2node

CTriggerMultiple::TeamTouchThink

0x00b1e230 · 300 bytes · __thiscall

_ZN16CTriggerMultiple14TeamTouchThinkEv

Decompiled

undefined (1 param)

/* CTriggerMultiple::TeamTouchThink() */

void __thiscall CTriggerMultiple::TeamTouchThink(CTriggerMultiple *this)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  CTriggerMultiple *local_1c;
  char local_18;
  CTriggerMultiple local_17;
  CTriggerMultiple local_16;
  int local_14;
  int local_10;
  
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
  local_14 = *(int *)(this + 0x588);
  local_1c = this;
  local_16 = this[0x58d];
  local_18 = '\x01';
  local_17 = this[0x58c];
  local_10 = 0;
  piVar2 = (int *)GetGlobalTeam(local_14);
  if (piVar2 != (int *)0x0) {
    iVar3 = (**(code **)(*piVar2 + 0x354))(piVar2);
    if (iVar3 == 0) {
      local_18 = '\0';
    }
  }
  ForEachPlayer<EntireTeamCheck>((EntireTeamCheck *)&local_1c);
  if (this[0x584] == (CTriggerMultiple)0x0) {
    if ((local_18 != '\0') && (0 < local_10)) {
      cVar1 = CDirectorChallengeMode::TeamStartTouchIsValid
                        (*(CDirectorChallengeMode **)(TheDirector + 0x648),(CBaseTrigger *)this);
      if (cVar1 != '\0') {
        COutputEvent::FireOutput
                  ((COutputEvent *)(this + 0x590),(CBaseEntity *)0x0,(CBaseEntity *)this,0.0);
        this[0x584] = (CTriggerMultiple)0x1;
      }
    }
  }
  else if (local_18 == '\0') {
    COutputEvent::FireOutput
              ((COutputEvent *)(this + 0x5a8),(CBaseEntity *)0x0,(CBaseEntity *)this,0.0);
    this[0x584] = (CTriggerMultiple)0x0;
    return;
  }
  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)