L L4D2node

CChoreoEvent::PreventTagOverlap

0x00ba6820 · 154 bytes · __thiscall

_ZN12CChoreoEvent17PreventTagOverlapEv

Decompiled

undefined (1 param)

/* CChoreoEvent::PreventTagOverlap() */

undefined4 __thiscall CChoreoEvent::PreventTagOverlap(CChoreoEvent *this)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  
  iVar3 = *(int *)(this + 0xf0);
  if (iVar3 + -1 < 0) {
    uVar1 = 0;
  }
  else {
    fVar4 = 1.0;
    fVar6 = 0.01;
    iVar2 = (iVar3 + -1) * 0x1c;
    uVar1 = 0;
    do {
      fVar5 = *(float *)(*(int *)(this + 0xe4) + iVar2 + 0x10);
      if (fVar4 < fVar5) {
        *(float *)(*(int *)(this + 0xe4) + iVar2 + 0x10) = fVar4;
        uVar1 = 1;
        fVar6 = fVar4 / (float)iVar3;
        fVar5 = fVar4;
        if (0.01 <= fVar6) {
          fVar6 = 0.01;
        }
      }
      iVar2 = iVar2 + -0x1c;
      iVar3 = iVar3 + -1;
      fVar4 = fVar5 - fVar6;
      if (fVar4 <= 0.0) {
        fVar4 = 0.0;
      }
    } while (iVar3 != 0);
  }
  return uVar1;
}

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)