L L4D2node

CEnvGunfire::Spawn

0x006734e0 · 308 bytes · __thiscall

_ZN11CEnvGunfire5SpawnEv

Decompiled

undefined (1 param)

/* CEnvGunfire::Spawn() */

void __thiscall CEnvGunfire::Spawn(CEnvGunfire *this)

{
  CEnvGunfire CVar1;
  int iVar2;
  
  (**(code **)(*(int *)this + 0x6c))(this);
  iVar2 = *(int *)(this + 0x464);
  *(undefined4 *)(this + 0x460) = 0;
  *(float *)(this + 0x450) = 1.0 / *(float *)(this + 0x450);
  if (iVar2 == 5) {
    *(undefined4 *)(this + 0x468) = 0x3d32aae3;
    *(undefined4 *)(this + 0x46c) = 0x3d32aae3;
    *(undefined4 *)(this + 0x470) = 0x3d32aae3;
  }
  else if (iVar2 < 6) {
    if (iVar2 == 1) {
      *(undefined4 *)(this + 0x468) = 0x3c0f0846;
      *(undefined4 *)(this + 0x46c) = 0x3c0f0846;
      *(undefined4 *)(this + 0x470) = 0x3c0f0846;
    }
    else {
LAB_006735c8:
      *(undefined4 *)(this + 0x468) = vec3_origin;
      *(undefined4 *)(this + 0x46c) = DAT_01053d4c;
      *(undefined4 *)(this + 0x470) = DAT_01053d50;
    }
  }
  else {
    if (iVar2 == 10) {
      CVar1 = this[0x45c];
      *(undefined4 *)(this + 0x468) = 0x3db280f1;
      *(undefined4 *)(this + 0x46c) = 0x3db280f1;
      *(undefined4 *)(this + 0x470) = 0x3db280f1;
      goto joined_r0x0067358d;
    }
    if (iVar2 != 0xf) goto LAB_006735c8;
    *(undefined4 *)(this + 0x468) = 0x3e05a9a8;
    *(undefined4 *)(this + 0x46c) = 0x3e05a9a8;
    *(undefined4 *)(this + 0x470) = 0x3e05a9a8;
  }
  CVar1 = this[0x45c];
joined_r0x0067358d:
  if (CVar1 != (CEnvGunfire)0x0) {
    return;
  }
  StartShooting(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)