L L4D2node

CTerrorGameMovement::UpdateMinGroundNormalZ

0x004fadc0 · 483 bytes · __thiscall

_ZN19CTerrorGameMovement22UpdateMinGroundNormalZEv

Decompiled

undefined (1 param)

/* CTerrorGameMovement::UpdateMinGroundNormalZ() */

void __thiscall CTerrorGameMovement::UpdateMinGroundNormalZ(CTerrorGameMovement *this)

{
  CBaseEntity *this_00;
  int iVar1;
  ITraceFilter *pIVar2;
  uint uVar3;
  Vector *pVVar4;
  Vector *pVVar5;
  int iVar6;
  undefined *puVar7;
  ITraceFilter *local_8c;
  undefined4 local_88;
  undefined4 local_84;
  float local_80;
  undefined4 local_7c;
  undefined4 local_78;
  float local_74;
  CGameTrace local_70 [32];
  float local_50;
  
  this_00 = *(CBaseEntity **)(this + 0x810);
  iVar1 = CBaseEntity::GetTeamNumber(this_00);
  if (iVar1 == 3) {
    iVar6 = (**(code **)(*(int *)this_00 + 0x544))(this_00);
    iVar1 = *(int *)(this + 0x810);
    if ((iVar6 == 3) && (*(char *)(iVar1 + 0x1a90) != '\0')) {
      *(undefined4 *)(this + 0x868) = *(undefined4 *)(ZombieHunterGroundNormal._28_4_ + 0x2c);
      return;
    }
  }
  else {
    iVar1 = *(int *)(this + 0x810);
  }
  uVar3 = *(uint *)(iVar1 + 0x33c4);
  if ((((uVar3 != 0xffffffff) &&
       (puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)) {
    iVar1 = *(int *)(this + 8);
    local_88 = *(undefined4 *)(iVar1 + 0x9c);
    local_84 = *(undefined4 *)(iVar1 + 0xa0);
    local_80 = *(float *)(iVar1 + 0xa4);
    local_74 = local_80 - 24.0;
    local_7c = local_88;
    local_78 = local_84;
    pIVar2 = (ITraceFilter *)(**(code **)(*(int *)this + 0x108))(this,8);
    local_8c = pIVar2;
    uVar3 = (**(code **)(*(int *)this + 0x40))(this,0,0);
    pVVar4 = (Vector *)(**(code **)(*(int *)this + 0x80))(this);
    pVVar5 = (Vector *)(**(code **)(*(int *)this + 0x7c))(this);
    TracePlayerBBoxForGround
              (*(ITraceListData **)(this + 0x7cc),(Vector *)&local_88,(Vector *)&local_7c,pVVar5,
               pVVar4,uVar3,pIVar2,local_70,0.7,true,(int *)(this + 2000));
    (**(code **)(*(int *)this + 0x10c))(this,&local_8c);
    *(uint *)(this + 0x868) =
         ~-(uint)(0.7 <= local_50) & 0x3f333333 | -(uint)(0.7 <= local_50) & 0xbf800000;
    return;
  }
  *(undefined4 *)(this + 0x868) = 0x3f333333;
  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)