L L4D2node

CTankTrainAI::Activate

0x00836030 · 700 bytes · __thiscall

_ZN12CTankTrainAI8ActivateEv

Decompiled

undefined (1 param)

/* CTankTrainAI::Activate() */

void __thiscall CTankTrainAI::Activate(CTankTrainAI *this)

{
  code *pcVar1;
  int *piVar2;
  char *pcVar3;
  undefined4 *puVar4;
  int *piVar5;
  undefined4 uVar6;
  undefined1 *puVar7;
  int iVar8;
  float *pfVar9;
  CBaseEntity *pCVar10;
  Vector local_48 [12];
  undefined **local_3c [11];
  
  pCVar10 = (CBaseEntity *)0x0;
  pfVar9 = (float *)&stack0xffffff84;
  CBaseEntity::Activate((CBaseEntity *)this);
  pcVar3 = *(char **)(this + 0xf8);
  if (pcVar3 != (char *)0x0) {
    while (pCVar10 = (CBaseEntity *)
                     CGlobalEntityList::FindEntityByName
                               ((CGlobalEntityList *)gEntList,pCVar10,pcVar3,(CBaseEntity *)0x0,
                                (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0),
          pCVar10 != (CBaseEntity *)0x0) {
      piVar2 = (int *)__dynamic_cast();
      if (piVar2 != (int *)0x0) {
        puVar4 = (undefined4 *)(**(code **)(*piVar2 + 0xc))();
        *(undefined4 *)(this + 0x440) = *puVar4;
        CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.5,(char *)0x0)
        ;
        piVar5 = (int *)CSoundEnvelopeController::GetController();
        if (*(int *)(this + 0x45c) != 0) {
          (**(code **)(*(int *)this + 0x28c))();
          CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
          local_3c[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 0083615b to 0083615f has its CatchHandler @ 0083631d */
          CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_3c,local_48);
          local_3c[0] = &PTR__CPASAttenuationFilter_00c08ec8;
                    /* try { // try from 00836170 to 0083618c has its CatchHandler @ 00836304 */
          (**(code **)(*(int *)this + 0x28c))();
          pfVar9 = (float *)&stack0xffffff7c;
          CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_3c,local_48,0.4);
                    /* try { // try from 008361e9 to 008361ea has its CatchHandler @ 00836322 */
          uVar6 = (**(code **)(*piVar5 + 0x1c))();
          *(undefined4 *)(this + 0x44c) = uVar6;
          local_3c[0] = &PTR__CPASFilter_00bfaf28;
          CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
        }
        if (*(int *)(this + 0x458) != 0) {
          iVar8 = *(int *)this;
          pfVar9[1] = (float)this;
          *pfVar9 = (float)local_48;
          pcVar1 = *(code **)(iVar8 + 0x28c);
          pfVar9[-1] = 1.2065658e-38;
          (*pcVar1)();
          pfVar9[-1] = (float)local_3c;
          pfVar9[-2] = 1.2065673e-38;
          CRecipientFilter::CRecipientFilter((CRecipientFilter *)pfVar9[-1]);
          *pfVar9 = (float)local_48;
          pfVar9[-1] = (float)local_3c;
          local_3c[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 0083623e to 00836242 has its CatchHandler @ 008362f2 */
          pfVar9[-2] = 1.20657e-38;
          CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)pfVar9[-1],(Vector *)*pfVar9);
          iVar8 = *(int *)this;
          local_3c[0] = &PTR__CPASAttenuationFilter_00c08ec8;
          *pfVar9 = (float)this;
          pfVar9[-1] = (float)local_48;
                    /* try { // try from 00836253 to 0083626f has its CatchHandler @ 00836324 */
          pcVar1 = *(code **)(iVar8 + 0x28c);
          pfVar9[-2] = 1.206573e-38;
          (*pcVar1)();
          *pfVar9 = 0.8;
          pfVar9[-1] = (float)local_48;
          pfVar9[-2] = (float)local_3c;
          pfVar9[-3] = 1.2065763e-38;
          CPASAttenuationFilter::Filter
                    ((CPASAttenuationFilter *)pfVar9[-2],(Vector *)pfVar9[-1],*pfVar9);
          pcVar1 = *(code **)(*piVar5 + 0x1c);
          puVar7 = &DAT_00d539c2;
          if (*(undefined1 **)(this + 0x458) != (undefined1 *)0x0) {
            puVar7 = *(undefined1 **)(this + 0x458);
          }
          if (piVar2[0xc] == 0) {
            iVar8 = 0;
          }
          else {
            iVar8 = piVar2[0xc] - *(int *)(gpGlobals + 0x58) >> 4;
          }
          pfVar9[2] = (float)puVar7;
          pfVar9[4] = 1.0;
          pfVar9[3] = 0.8;
          pfVar9[1] = 8.40779e-45;
          *pfVar9 = (float)iVar8;
          pfVar9[-1] = (float)local_3c;
          pfVar9[-2] = (float)piVar5;
                    /* try { // try from 008362c8 to 008362c9 has its CatchHandler @ 0083631f */
          pfVar9[-3] = 1.2065889e-38;
          uVar6 = (*pcVar1)();
          *(undefined4 *)(this + 0x450) = uVar6;
          pfVar9[-2] = (float)local_3c;
          local_3c[0] = &PTR__CPASFilter_00bfaf28;
          pfVar9[-3] = 1.2065918e-38;
          CRecipientFilter::~CRecipientFilter((CRecipientFilter *)pfVar9[-2]);
        }
        return;
      }
      pcVar3 = *(char **)(this + 0xf8);
      if (pcVar3 == (char *)0x0) {
        pcVar3 = "";
      }
    }
  }
  *(undefined4 *)(this + 0x440) = 0xffffffff;
  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)