L L4D2node

CVomitParticle::Spawn

0x004e3f10 · 465 bytes · __thiscall

_ZN14CVomitParticle5SpawnEv

Decompiled

undefined (1 param)

/* CVomitParticle::Spawn() */

void __thiscall CVomitParticle::Spawn(CVomitParticle *this)

{
  float fVar1;
  float fVar2;
  int iVar3;
  longdouble lVar4;
  undefined1 local_34 [16];
  uint local_24;
  uint local_20;
  uint local_1c;
  uint local_18;
  uint local_14;
  uint local_10;
  
  CBaseEntity::Spawn((CBaseEntity *)this);
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),2);
  CCollisionProperty::SetSolidFlags((CCollisionProperty *)(this + 0x194),0xc);
  CBaseEntity::SetMoveType((CBaseEntity *)this,4,2);
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) | 0x20000000;
  CBaseEntity::SetCollisionGroup((CBaseEntity *)this,0);
  local_18 = *(uint *)(z_vomit_boxsize._28_4_ + 0x2c);
  local_24 = local_18 ^ 0x80000000;
  local_20 = local_24;
  local_1c = local_24;
  local_14 = local_18;
  local_10 = local_18;
  UTIL_SetSize((CBaseEntity *)this,(Vector *)&local_24,(Vector *)&local_18);
  if (this[0x105] != (CVomitParticle)0x0) {
    (**(code **)(*(int *)this + 0x224))(this,this + 0x105);
    this[0x105] = (CVomitParticle)0x0;
  }
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  iVar3 = gpGlobals;
  *(undefined4 *)(this + 0x474) = *(undefined4 *)(this + 0x2e0);
  *(undefined4 *)(this + 0x478) = *(undefined4 *)(this + 0x2e4);
  *(undefined4 *)(this + 0x47c) = *(undefined4 *)(this + 0x2e8);
  fVar1 = *(float *)(iVar3 + 0xc);
  fVar2 = *(float *)(z_vomit_lifetime._28_4_ + 0x2c);
  lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x3f666666,0x3f8ccccd);
  *(float *)(this + 0x458) = (float)lVar4 * fVar2 + fVar1;
  CBaseEntity::ThinkSet((_func_void *)local_34,(float)this,(char *)FlyThink);
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
  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)