L L4D2node

CFuncPlat::Setup

0x00b0b030 · 609 bytes · __thiscall

_ZN9CFuncPlat5SetupEv

Decompiled

undefined (1 param)

/* WARNING: Removing unreachable block (ram,0x00b0b198) */
/* WARNING: Removing unreachable block (ram,0x00b0b29f) */
/* CFuncPlat::Setup() */

uint __thiscall CFuncPlat::Setup(CFuncPlat *this)

{
  code *pcVar1;
  undefined1 *puVar2;
  uint uVar3;
  int iVar4;
  float fVar5;
  float fVar6;
  undefined1 *local_10;
  
  if (*(float *)(this + 0x4cc) == 0.0) {
    *(undefined4 *)(this + 0x4cc) = 0x42a00000;
  }
  if (*(float *)(this + 0x4c8) == 0.0) {
    *(undefined4 *)(this + 0x4c8) = 0x41200000;
  }
  CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)&vec3_angle);
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),1);
  CBaseEntity::SetMoveType((CBaseEntity *)this,7,0);
  pcVar1 = *(code **)(*(int *)this + 0x70);
  (**(code **)(*(int *)this + 0x20))(&local_10,this);
  puVar2 = &DAT_00d539c2;
  if (local_10 != (undefined1 *)0x0) {
    puVar2 = local_10;
  }
  uVar3 = (*pcVar1)(this,puVar2);
  *(undefined4 *)(this + 0x458) = *(undefined4 *)(this + 0x3a0);
  *(undefined4 *)(this + 0x464) = *(undefined4 *)(this + 0x3a0);
  fVar6 = *(float *)(this + 0x490);
  fVar5 = *(float *)(this + 0x3a4);
  *(undefined4 *)(this + 0x454) = *(undefined4 *)(this + 0x39c);
  *(undefined4 *)(this + 0x460) = *(undefined4 *)(this + 0x39c);
  *(float *)(this + 0x45c) = fVar5;
  *(float *)(this + 0x468) = fVar5;
  if (fVar6 == 0.0) {
    if ((AllocTempVector()::s_vecTemp == '\0') &&
       (iVar4 = __cxa_guard_acquire(&AllocTempVector()::s_vecTemp), iVar4 != 0)) {
      __cxa_guard_release(&AllocTempVector()::s_vecTemp);
    }
    if ((AllocTempVector()::s_nIndex == '\0') &&
       (iVar4 = __cxa_guard_acquire(&AllocTempVector()::s_nIndex), iVar4 != 0)) {
      AllocTempVector()::s_nIndex = 0;
      __cxa_guard_release(&AllocTempVector()::s_nIndex);
    }
    uVar3 = AllocTempVector()::s_nIndex;
    AllocTempVector()::s_nIndex = AllocTempVector()::s_nIndex + 0x10001 & 0x7f;
    LOCK();
    UNLOCK();
    iVar4 = AllocTempVector()::s_nIndex * 0xc;
    fVar5 = fVar5 + 8.0;
    *(float *)(AllocTempVector()::s_vecTemp + iVar4) =
         *(float *)(this + 0x1a8) - *(float *)(this + 0x19c);
    *(float *)(AllocTempVector()::s_vecTemp + iVar4 + 4) =
         *(float *)(this + 0x1ac) - *(float *)(this + 0x1a0);
    fVar6 = *(float *)(this + 0x1b0) - *(float *)(this + 0x1a4);
    *(float *)(AllocTempVector()::s_vecTemp + iVar4 + 8) = fVar6;
  }
  *(float *)(this + 0x468) = fVar5 - fVar6;
  if (*(float *)(this + 0x11c) == 0.0) {
    *(undefined4 *)(this + 0x11c) = 0x43160000;
  }
  if (*(float *)(this + 0x4c4) == 0.0) {
    *(undefined4 *)(this + 0x4c4) = 0x3f59999a;
  }
  return uVar3;
}

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)