L L4D2node

CPointTemplate::InputForceSpawn

0x007dfe90 · 545 bytes · __thiscall

_ZN14CPointTemplate15InputForceSpawnER11inputdata_t

Decompiled

undefined (2 params)

/* CPointTemplate::InputForceSpawn(inputdata_t&) */

void __thiscall CPointTemplate::InputForceSpawn(CPointTemplate *this,inputdata_t *param_1)

{
  code *pcVar1;
  char cVar2;
  char *pcVar3;
  int iVar4;
  char *pcVar5;
  CPointTemplate *local_40;
  CBaseEntity **local_30;
  undefined4 local_2c;
  undefined4 local_28;
  int local_24;
  CBaseEntity **local_20;
  
  pcVar3 = *(char **)(gpGlobals + 0x3c);
  if (pcVar3 == (char *)0x0) {
    pcVar3 = "";
  }
  iVar4 = _V_stricmp(pcVar3,"l4d_farm05_cornfield");
  if ((iVar4 == 0) && (*(int *)(param_1 + 4) != 0)) {
    pcVar3 = *(char **)(*(int *)(param_1 + 4) + 0x7c);
    pcVar5 = "";
    if (pcVar3 != (char *)0x0) {
      pcVar5 = pcVar3;
    }
    iVar4 = _V_stricmp(pcVar5,"logic_relay");
    if (iVar4 == 0) {
      pcVar3 = (char *)CBaseEntity::GetDebugName(*(CBaseEntity **)(param_1 + 4));
      iVar4 = _V_stricmp(pcVar3,"new_apc_arrive_relay");
      if (iVar4 == 0) {
        local_30 = (CBaseEntity **)0x0;
        local_2c = 0;
        local_28 = 0;
        local_24 = 0;
        pcVar1 = *(code **)(*(int *)this + 0x324);
        local_20 = (CBaseEntity **)0x0;
        if ((((byte)this[0x14d] & 8) != 0) &&
           (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
                    /* try { // try from 007e005e to 007e00c5 has its CatchHandler @ 007e00cb */
        cVar2 = (*pcVar1)(this,this + 0x2e0,this + 0x37c,&local_30,0,1);
        goto LAB_007dff5a;
      }
    }
  }
  local_30 = (CBaseEntity **)0x0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_20 = (CBaseEntity **)0x0;
  pcVar1 = *(code **)(*(int *)this + 0x324);
  if ((((byte)this[0x14d] & 8) != 0) &&
     (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  local_40 = this + 0x37c;
                    /* try { // try from 007dff58 to 007dffc8 has its CatchHandler @ 007e00cb */
  cVar2 = (*pcVar1)(this,this + 0x2e0,local_40,&local_30,0,0);
LAB_007dff5a:
  if (cVar2 != '\0') {
    if (local_24 != 0) {
      ScriptPostSpawn((CScriptScopeT *)(this + 1000),local_30,local_24);
    }
    COutputEvent::FireOutput
              ((COutputEvent *)(this + 0x4a8),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
  }
  local_24 = 0;
  CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)&local_30);
  local_20 = local_30;
  CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)&local_30);
  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)