L L4D2node

CTongue::OnCreate

0x00846b30 · 714 bytes · __thiscall

_ZN7CTongue8OnCreateEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* CTongue::OnCreate(CTerrorPlayer*) */

void __thiscall CTongue::OnCreate(CTongue *this,CTerrorPlayer *param_1)

{
  CTongue CVar1;
  uint uVar2;
  CBaseEdict *pCVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  
  CBaseAbility::StartActivationTimer((CBaseAbility *)this,0.0,0.0);
  if (*(int *)(this + 0x460) != 0) {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x460) = 0;
  }
  if (*(float *)(this + 0x474) != 0.0) {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x474) = 0;
  }
  if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
    iVar6 = 0;
  }
  else {
    iVar6 = *(int *)(g_pEntityList + 4);
  }
  uVar2 = *(uint *)(this + 0x47c);
  if (((uVar2 == 0xffffffff) ||
      (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar4 + 8) != uVar2 >> 0xc)) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(puVar4 + 4);
  }
  if (iVar6 != iVar5) {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x47c) = 0;
  }
  if (*(float *)(this + 0x464) != 0.0) {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x464) = 0;
  }
  if (*(float *)(this + 0x468) == 0.0) {
    CVar1 = this[0x46c];
  }
  else {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
    }
    CVar1 = this[0x46c];
    *(undefined4 *)(this + 0x468) = 0;
  }
  if (CVar1 != (CTongue)0x0) {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
    }
    this[0x46c] = (CTongue)0x0;
  }
  if (*(int *)(this + 0x4ac) != 0) {
    if (this[0x6c] == (CTongue)0x0) {
      pCVar3 = *(CBaseEdict **)(this + 0x30);
      if (pCVar3 != (CBaseEdict *)0x0) {
        *(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
      *(undefined4 *)(this + 0x4ac) = 0;
    }
    else {
      this[0x70] = (CTongue)((byte)this[0x70] | 1);
      *(undefined4 *)(this + 0x4ac) = 0;
    }
  }
  *(undefined4 *)(this + 0x56c) = 8;
  *(undefined4 *)(this + 0x570) = 8;
  CBaseAbility::OnCreate((CBaseAbility *)this,param_1);
  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)