L L4D2node

CEntityDissolve::Create

0x00679480 · 238 bytes · __cdecl

_ZN15CEntityDissolve6CreateEP11CBaseEntityS1_

Decompiled

undefined (2 params)

/* CEntityDissolve::Create(CBaseEntity*, CBaseEntity*) */

undefined4 CEntityDissolve::Create(CBaseEntity *param_1,CBaseEntity *param_2)

{
  uint uVar1;
  float fVar2;
  undefined *puVar3;
  int *piVar4;
  char *pcVar5;
  undefined4 uVar6;
  undefined *puVar7;
  int iVar8;
  char *local_10;
  
  puVar3 = g_pEntityList;
  iVar8 = 0;
  uVar1 = *(uint *)(param_2 + 0x18c);
  if ((uVar1 != 0xffffffff) &&
     (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) {
    if (*(uint *)(puVar7 + 8) == uVar1 >> 0xc) goto LAB_00679520;
    iVar8 = 0;
  }
  while( true ) {
    if (iVar8 == 0) {
      return 0;
    }
    piVar4 = (int *)__dynamic_cast(iVar8,&CBaseEntity::typeinfo,&typeinfo,0);
    if (piVar4 != (int *)0x0) {
      iVar8 = piVar4[0x117];
      fVar2 = (float)piVar4[0x110];
      (**(code **)(*piVar4 + 0x20))(&local_10,piVar4);
      pcVar5 = "";
      if (local_10 != (char *)0x0) {
        pcVar5 = local_10;
      }
      uVar6 = Create(param_1,pcVar5,fVar2,iVar8,(bool *)0x0);
      return uVar6;
    }
    uVar1 = *(uint *)(iVar8 + 400);
    if (uVar1 == 0xffffffff) {
      return 0;
    }
    puVar7 = puVar3 + (uVar1 & 0xfff) * 0x10;
    if (puVar7 == (undefined *)0xfffffffc) break;
    if (*(uint *)(puVar7 + 8) != uVar1 >> 0xc) {
      return 0;
    }
LAB_00679520:
    iVar8 = *(int *)(puVar7 + 4);
  }
  return 0;
}

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)