L L4D2node

CLogicLineToEntity::Activate

0x006e9290 · 541 bytes · __thiscall

_ZN18CLogicLineToEntity8ActivateEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CLogicLineToEntity::Activate() */

void __thiscall CLogicLineToEntity::Activate(CLogicLineToEntity *this)

{
  uint uVar1;
  int *piVar2;
  uint *puVar3;
  undefined4 *puVar4;
  char *pcVar5;
  undefined *puVar6;
  
  CBaseEntity::Activate((CBaseEntity *)this);
  if (*(char **)(this + 0xf8) == (char *)0x0) {
    if (this != (CLogicLineToEntity *)0x0) goto LAB_006e933f;
LAB_006e9436:
    _DAT_00000460 = 0xffffffff;
    pcVar5 = _DAT_00000458;
    if (_DAT_00000458 == (char *)0x0) {
      _DAT_0000045c = 0xffffffff;
      _DAT_00000460 = 0xffffffff;
      return;
    }
LAB_006e9360:
    piVar2 = (int *)CGlobalEntityList::FindEntityByName
                              ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar5,
                               (CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                               (IEntityFindFilter *)0x0);
    if (piVar2 == (int *)0x0) {
      *(undefined4 *)(this + 0x45c) = 0xffffffff;
    }
    else {
      puVar3 = (uint *)(**(code **)(*piVar2 + 0xc))(piVar2);
      puVar6 = g_pEntityList;
      uVar1 = *puVar3;
      *(uint *)(this + 0x45c) = uVar1;
      if (((uVar1 != 0xffffffff) &&
          (puVar6 = puVar6 + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
         ((*(uint *)(puVar6 + 8) == uVar1 >> 0xc &&
          ((*(int *)(puVar6 + 4) != 0 && (*(int *)(*(int *)(puVar6 + 4) + 0x30) != 0)))))) {
        return;
      }
    }
    Warning("logic_lineto - Source not found or source with no origin!\n");
  }
  else {
    piVar2 = (int *)CGlobalEntityList::FindEntityByName
                              ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,
                               *(char **)(this + 0xf8),(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                               (CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
    if (piVar2 == (int *)0x0) {
      *(undefined4 *)(this + 0x460) = 0xffffffff;
      Warning("logic_lineto - Target not found or target with no origin!\n");
joined_r0x006e9430:
      if (this == (CLogicLineToEntity *)0x0) goto LAB_006e9436;
LAB_006e933f:
      puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
      *(undefined4 *)(this + 0x460) = *puVar4;
      pcVar5 = *(char **)(this + 0x458);
      if (pcVar5 == (char *)0x0) goto LAB_006e93eb;
      goto LAB_006e9360;
    }
    puVar3 = (uint *)(**(code **)(*piVar2 + 0xc))(piVar2);
    puVar6 = g_pEntityList;
    uVar1 = *puVar3;
    *(uint *)(this + 0x460) = uVar1;
    if ((((uVar1 == 0xffffffff) ||
         (puVar6 = puVar6 + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) ||
       ((*(int *)(puVar6 + 4) == 0 || (*(int *)(*(int *)(puVar6 + 4) + 0x30) == 0)))) {
      Warning("logic_lineto - Target not found or target with no origin!\n");
      goto joined_r0x006e9430;
    }
    pcVar5 = *(char **)(this + 0x458);
    if (pcVar5 != (char *)0x0) goto LAB_006e9360;
  }
  if (this == (CLogicLineToEntity *)0x0) {
    _DAT_0000045c = 0xffffffff;
    return;
  }
LAB_006e93eb:
  puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
  *(undefined4 *)(this + 0x45c) = *puVar4;
  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)