L L4D2node

CCollisionEvent::PostSimulationFrame

0x0077b7d0 · 501 bytes · __thiscall

_ZN15CCollisionEvent19PostSimulationFrameEv

Decompiled

undefined (1 param)

/* CCollisionEvent::PostSimulationFrame() */

void __thiscall CCollisionEvent::PostSimulationFrame(CCollisionEvent *this)

{
  int *piVar1;
  undefined4 *puVar2;
  int iVar3;
  char cVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  int iVar7;
  
  UpdateDamageEvents(this);
  if (DAT_00fec4f0 != 0) {
    do {
      puVar5 = DAT_00fec4f8;
      if (DAT_00fec4f8 == (undefined4 *)0x0) {
        puVar5 = ::operator_new(8);
        break;
      }
      cVar4 = ThreadInterlockedAssignIf64
                        (&DAT_00fec4f8,*DAT_00fec4f8,DAT_00fec4fc + -1,DAT_00fec4f8,DAT_00fec4fc);
    } while (cVar4 == '\0');
    puVar5[1] = 0;
    *puVar5 = &g_PostSimulationQueue;
    while( true ) {
      iVar3 = DAT_00fec4ec;
      puVar2 = DAT_00fec4e8;
      LOCK();
      puVar6 = (undefined4 *)*DAT_00fec4e8;
      if ((undefined4 **)puVar6 == &g_PostSimulationQueue) {
        *DAT_00fec4e8 = puVar5;
        puVar6 = &g_PostSimulationQueue;
      }
      UNLOCK();
      if ((undefined4 **)puVar6 == &g_PostSimulationQueue) break;
      ThreadInterlockedAssignIf64(&DAT_00fec4e8,*puVar2,iVar3 + 1,puVar2,iVar3);
    }
    ThreadInterlockedAssignIf64(&DAT_00fec4e8,puVar5,iVar3 + 1,puVar2,iVar3);
    LOCK();
    DAT_00fec4f0 = DAT_00fec4f0 + 1;
    UNLOCK();
    while( true ) {
      while( true ) {
        do {
          puVar6 = g_PostSimulationQueue;
          puVar5 = (undefined4 *)*g_PostSimulationQueue;
        } while (puVar5 == (undefined4 *)0x0);
        if (g_PostSimulationQueue == DAT_00fec4e8) break;
        if ((undefined4 **)puVar5 != &g_PostSimulationQueue) {
          piVar1 = (int *)puVar5[1];
          cVar4 = ThreadInterlockedAssignIf64
                            (&g_PostSimulationQueue,puVar5,DAT_00fec4e4 + 1,g_PostSimulationQueue,
                             DAT_00fec4e4);
          if (cVar4 != '\0') {
            LOCK();
            DAT_00fec4f0 = DAT_00fec4f0 + -1;
            UNLOCK();
            puVar6[1] = piVar1;
            do {
              iVar3 = DAT_00fec4fc;
              puVar5 = DAT_00fec4f8;
              iVar7 = DAT_00fec4fc + 0x10001;
              *puVar6 = DAT_00fec4f8;
              cVar4 = ThreadInterlockedAssignIf64(&DAT_00fec4f8,puVar6,iVar7,puVar5,iVar3);
            } while (cVar4 == '\0');
            if (piVar1 == (int *)0x0) goto LAB_0077b7ed;
            (**(code **)(*piVar1 + 0x10))(piVar1);
            (**(code **)(*piVar1 + 4))(piVar1);
          }
        }
      }
      if ((undefined4 **)puVar5 == &g_PostSimulationQueue) break;
      ThreadInterlockedAssignIf64
                (&DAT_00fec4e8,puVar5,DAT_00fec4ec + 1,g_PostSimulationQueue,DAT_00fec4ec);
    }
  }
LAB_0077b7ed:
  UpdateRemoveObjects(this);
  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)