L L4D2node

CEnvMicrophone::Spawn

0x00687c00 · 207 bytes · __thiscall

_ZN14CEnvMicrophone5SpawnEv

Decompiled

undefined (1 param)

/* CEnvMicrophone::Spawn() */

void __thiscall CEnvMicrophone::Spawn(CEnvMicrophone *this)

{
  float fVar1;
  int iVar2;
  float fVar3;
  
  iVar2 = 0;
  do {
    if (((&Spawn()::nFlags)[iVar2 * 2] & *(uint *)(this + 0x148)) != 0) {
      *(uint *)(this + 0x448) = *(uint *)(this + 0x448) | (&DAT_00c7abc4)[iVar2 * 2];
    }
    iVar2 = iVar2 + 1;
  } while (iVar2 != 5);
  if (*(float *)(this + 0x44c) == 0.0) {
    *(undefined4 *)(this + 0x44c) = 0x3f800000;
  }
  else if (10.0 < *(float *)(this + 0x44c)) {
    *(undefined4 *)(this + 0x44c) = 0x41200000;
  }
  fVar1 = *(float *)(this + 0x450);
  fVar3 = 0.0;
  if (0.0 <= fVar1) {
    fVar3 = fVar1;
  }
  if (0.9 < fVar1) {
    fVar3 = 0.9;
  }
  *(float *)(this + 0x450) = fVar3;
  if (this[0x440] == (CEnvMicrophone)0x0) {
    CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(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)