L L4D2node

ZombieBotBody::SetDesiredPosture

0x00a4e440 · 301 bytes · __thiscall

_ZN13ZombieBotBody17SetDesiredPostureEN5IBody11PostureTypeE

Decompiled

undefined (2 params)

/* ZombieBotBody::SetDesiredPosture(IBody::PostureType) */

void __thiscall ZombieBotBody::SetDesiredPosture(ZombieBotBody *this,undefined4 param_2)

{
  CBaseEdict *this_00;
  int iVar1;
  int iVar2;
  int *piVar3;
  CBaseEntity *this_01;
  longdouble lVar4;
  float fVar5;
  float local_34;
  float local_30;
  undefined4 local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  iVar1 = GetPostureTransitionActivity(this,param_2);
  if (iVar1 != -1) {
    (**(code **)(*(int *)this + 0xd8))(this,iVar1,1);
    iVar1 = *(int *)(this + 0x14);
    if (*(float *)(iVar1 + 0x468) != 1.0) {
      if (*(char *)(iVar1 + 0x6c) == '\0') {
        this_00 = *(CBaseEdict **)(iVar1 + 0x30);
        if (this_00 != (CBaseEdict *)0x0) {
          *(uint *)this_00 = *(uint *)this_00 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(this_00);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar1 + 0x70) = *(byte *)(iVar1 + 0x70) | 1;
      }
      *(undefined4 *)(iVar1 + 0x468) = 0x3f800000;
    }
    *(undefined4 *)(this + 0x40) = param_2;
    return;
  }
  *(undefined4 *)(this + 0x40) = param_2;
  *(undefined4 *)(this + 0x44) = param_2;
  lVar4 = (longdouble)(**(code **)(*(int *)this + 0x118))(this);
  local_2c = 0;
  fVar5 = (float)lVar4 * 0.5;
  local_34 = -fVar5;
  local_30 = local_34;
  lVar4 = (longdouble)(**(code **)(*(int *)this + 0x11c))(this);
  local_20 = (float)lVar4;
  local_28 = fVar5;
  local_24 = fVar5;
  piVar3 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
  this_01 = (CBaseEntity *)(**(code **)(*piVar3 + 0xb4))(piVar3);
  CBaseEntity::SetCollisionBounds(this_01,(Vector *)&local_34,(Vector *)&local_28);
  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)