L L4D2node

CC_CreateFlashlight

0x00693970 · 222 bytes · __cdecl

_Z19CC_CreateFlashlightRK8CCommand

Decompiled

undefined (1 param)

/* CC_CreateFlashlight(CCommand const&) */

void CC_CreateFlashlight(CCommand *param_1)

{
  int *piVar1;
  undefined4 *puVar2;
  int iVar3;
  int local_40 [3];
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined1 local_28 [24];
  
  piVar1 = (int *)UTIL_GetCommandClient();
  if (piVar1 != (int *)0x0) {
    puVar2 = (undefined4 *)(**(code **)(*piVar1 + 0x238))(piVar1);
    local_34 = *puVar2;
    local_30 = puVar2[1];
    local_2c = puVar2[2];
    (**(code **)(*piVar1 + 0x234))(local_28,piVar1);
    iVar3 = CreateEntityByName("env_projectedtexture",-1,true);
    if (iVar3 == 0) {
      piVar1 = (int *)0x0;
    }
    else {
      piVar1 = (int *)__dynamic_cast(iVar3,&CBaseEntity::typeinfo,&CEnvProjectedTexture::typeinfo,0)
      ;
    }
    if (1 < *(int *)param_1) {
      AllocPooledString((char *)local_40);
      piVar1[0x55] = local_40[0];
    }
    (**(code **)(*piVar1 + 0x1dc))(piVar1,local_28,&local_34,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)