L L4D2node

CVomit::StartVomitEffect

0x004e4a40 · 531 bytes · __thiscall

_ZN6CVomit16StartVomitEffectEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CVomit::StartVomitEffect() */

void __thiscall CVomit::StartVomitEffect(CVomit *this)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  undefined *puVar4;
  int *piVar5;
  undefined4 local_88;
  undefined4 local_84;
  undefined4 local_80;
  undefined4 local_7c;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  int local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined2 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined1 local_24;
  undefined1 local_23;
  
  puVar4 = g_pEntityList;
  uVar2 = *(uint *)(this + 0x44c);
  if (uVar2 == 0xffffffff) {
    return;
  }
  puVar1 = g_pEntityList + (uVar2 & 0xfff) * 0x10;
  if (puVar1 == (undefined *)0xfffffffc) {
    return;
  }
  if (*(uint *)(puVar1 + 8) != uVar2 >> 0xc) {
    return;
  }
  if (*(int *)(puVar1 + 4) == 0) {
    return;
  }
  iVar3 = IPredictionSystem::g_pPredictionSystems;
  if (IPredictionSystem::g_pPredictionSystems != 0) {
    do {
      *(int *)(iVar3 + 0x10) = *(int *)(iVar3 + 0x10) + 1;
      piVar5 = (int *)(iVar3 + 4);
      iVar3 = *piVar5;
    } while (*piVar5 != 0);
    uVar2 = *(uint *)(this + 0x44c);
  }
  local_7c = 0;
  local_78 = 0;
  local_74 = 0;
  local_70 = 0;
  local_6c = 0;
  local_68 = 0;
  local_64 = 0;
  local_60 = 0;
  local_5c = 0;
  local_58 = 0;
  local_54 = 0;
  local_50 = 0;
  local_4c = 0;
  local_44 = 0x3f800000;
  local_38 = 0;
  local_34 = 0;
  local_40 = 0;
  local_3c = 0;
  local_30 = 0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_23 = 0;
  iVar3 = _DAT_00000030;
  if (((uVar2 != 0xffffffff) &&
      (puVar1 = puVar4 + (uVar2 & 0xfff) * 0x10, puVar1 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar1 + 8) == uVar2 >> 0xc)) {
    iVar3 = *(int *)(*(int *)(puVar1 + 4) + 0x30);
  }
  if (iVar3 == 0) {
    local_48 = 0;
  }
  else {
    local_48 = iVar3 - *(int *)(gpGlobals + 0x58) >> 4;
  }
  piVar5 = (int *)0x0;
  if (((uVar2 != 0xffffffff) &&
      (puVar4 = puVar4 + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) {
    piVar5 = *(int **)(puVar4 + 4);
  }
                    /* try { // try from 004e4bc7 to 004e4c03 has its CatchHandler @ 004e4c5e */
  (**(code **)(*piVar5 + 0x234))(&local_88,piVar5);
  local_7c = local_88;
  local_78 = local_84;
  local_74 = local_80;
  DispatchEffect("startvomit",(CEffectData *)&local_7c);
  iVar3 = IPredictionSystem::g_pPredictionSystems;
  if (IPredictionSystem::g_pPredictionSystems == 0) {
    return;
  }
  do {
    *(int *)(iVar3 + 0x10) = *(int *)(iVar3 + 0x10) + -1;
    piVar5 = (int *)(iVar3 + 4);
    iVar3 = *piVar5;
  } while (*piVar5 != 0);
  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)