L L4D2node

CVomit::StopVomitEffect

0x004e4c80 · 512 bytes · __thiscall

_ZN6CVomit15StopVomitEffectEv

Decompiled

undefined (1 param)

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

void __thiscall CVomit::StopVomitEffect(CVomit *this)

{
  int *piVar1;
  undefined *puVar2;
  uint uVar3;
  int iVar4;
  undefined *puVar5;
  CBaseEntity *this_00;
  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;
  
  puVar5 = g_pEntityList;
  uVar3 = *(uint *)(this + 0x44c);
  if (uVar3 == 0xffffffff) {
    return;
  }
  puVar2 = g_pEntityList + (uVar3 & 0xfff) * 0x10;
  if (puVar2 == (undefined *)0xfffffffc) {
    return;
  }
  if (*(uint *)(puVar2 + 8) != uVar3 >> 0xc) {
    return;
  }
  if (*(int *)(puVar2 + 4) == 0) {
    return;
  }
  iVar4 = IPredictionSystem::g_pPredictionSystems;
  if (IPredictionSystem::g_pPredictionSystems != 0) {
    do {
      *(int *)(iVar4 + 0x10) = *(int *)(iVar4 + 0x10) + 1;
      piVar1 = (int *)(iVar4 + 4);
      iVar4 = *piVar1;
    } while (*piVar1 != 0);
    uVar3 = *(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;
  iVar4 = _DAT_00000030;
  if (((uVar3 != 0xffffffff) &&
      (puVar2 = puVar5 + (uVar3 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar2 + 8) == uVar3 >> 0xc)) {
    iVar4 = *(int *)(*(int *)(puVar2 + 4) + 0x30);
  }
  if (iVar4 == 0) {
    local_48 = 0;
  }
  else {
    local_48 = iVar4 - *(int *)(gpGlobals + 0x58) >> 4;
  }
  this_00 = (CBaseEntity *)0x0;
  if (((uVar3 != 0xffffffff) &&
      (puVar5 = puVar5 + (uVar3 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar5 + 8) == uVar3 >> 0xc)) {
    this_00 = *(CBaseEntity **)(puVar5 + 4);
  }
  if (((byte)this_00[0x14d] & 8) != 0) {
                    /* try { // try from 004e4e04 to 004e4e42 has its CatchHandler @ 004e4e8e */
    CBaseEntity::CalcAbsolutePosition(this_00);
  }
  local_7c = *(undefined4 *)(this_00 + 0x2e0);
  local_78 = *(undefined4 *)(this_00 + 0x2e4);
  local_74 = *(undefined4 *)(this_00 + 0x2e8);
  DispatchEffect("stopvomit",(CEffectData *)&local_7c);
  iVar4 = IPredictionSystem::g_pPredictionSystems;
  if (IPredictionSystem::g_pPredictionSystems == 0) {
    return;
  }
  do {
    *(int *)(iVar4 + 0x10) = *(int *)(iVar4 + 0x10) + -1;
    iVar4 = *(int *)(iVar4 + 4);
  } while (iVar4 != 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)