L L4D2node

ZombieBotBody::OnLandOnGround

0x00a4b8b0 · 492 bytes · __cdecl

_ZN13ZombieBotBody14OnLandOnGroundEP11CBaseEntity

Decompiled

undefined (1 param)

/* ZombieBotBody::OnLandOnGround(CBaseEntity*) */

void ZombieBotBody::OnLandOnGround(CBaseEntity *param_1)

{
  CBaseEntity *pCVar1;
  char cVar2;
  int *piVar3;
  int iVar4;
  longdouble lVar5;
  
  cVar2 = (**(code **)(*(int *)param_1 + 0xe8))(param_1,2);
  if (cVar2 == '\0') {
    piVar3 = (int *)(**(code **)(*(int *)param_1 + 0xb0))(param_1);
    piVar3 = (int *)(**(code **)(*piVar3 + 0xc0))(piVar3);
    lVar5 = (longdouble)(**(code **)(*piVar3 + 0x104))(piVar3);
    pCVar1 = *(CBaseEntity **)(param_1 + 0x14);
    if ((float)lVar5 < *(float *)(ZombieFallingLandForwardSpeed._28_4_ + 0x2c) ||
        (float)lVar5 == *(float *)(ZombieFallingLandForwardSpeed._28_4_ + 0x2c)) {
      if (((byte)pCVar1[0x14d] & 0x10) != 0) {
        CBaseEntity::CalcAbsoluteVelocity(pCVar1);
      }
      if (*(float *)(pCVar1 + 0x27c) <= -*(float *)(ZombieFallingLandHardSpeed._28_4_ + 0x2c) &&
          -*(float *)(ZombieFallingLandHardSpeed._28_4_ + 0x2c) != *(float *)(pCVar1 + 0x27c)) {
        (**(code **)(*(int *)param_1 + 0xd8))(param_1,0x299,5);
      }
      else {
        pCVar1 = *(CBaseEntity **)(param_1 + 0x14);
        if (((byte)pCVar1[0x14d] & 0x10) != 0) {
          CBaseEntity::CalcAbsoluteVelocity(pCVar1);
        }
        iVar4 = *(int *)param_1;
        if (-*(float *)(ZombieFallingLandSpeed._28_4_ + 0x2c) < *(float *)(pCVar1 + 0x27c) ||
            -*(float *)(ZombieFallingLandSpeed._28_4_ + 0x2c) == *(float *)(pCVar1 + 0x27c))
        goto LAB_00a4b9e7;
        (**(code **)(iVar4 + 0xd8))(param_1,0x298,5);
      }
    }
    else {
      if (((byte)pCVar1[0x14d] & 0x10) != 0) {
        CBaseEntity::CalcAbsoluteVelocity(pCVar1);
      }
      if (*(float *)(pCVar1 + 0x27c) <= -*(float *)(ZombieFallingLandHardSpeed._28_4_ + 0x2c) &&
          -*(float *)(ZombieFallingLandHardSpeed._28_4_ + 0x2c) != *(float *)(pCVar1 + 0x27c)) {
        (**(code **)(*(int *)param_1 + 0xd8))(param_1,0x297,5);
      }
      else {
        pCVar1 = *(CBaseEntity **)(param_1 + 0x14);
        if (((byte)pCVar1[0x14d] & 0x10) != 0) {
          CBaseEntity::CalcAbsoluteVelocity(pCVar1);
        }
        iVar4 = *(int *)param_1;
        if (-*(float *)(ZombieFallingLandSpeed._28_4_ + 0x2c) < *(float *)(pCVar1 + 0x27c) ||
            -*(float *)(ZombieFallingLandSpeed._28_4_ + 0x2c) == *(float *)(pCVar1 + 0x27c)) {
LAB_00a4b9e7:
          (**(code **)(iVar4 + 0xd8))
                    (param_1,*(undefined4 *)(param_1 + 0x5c),*(undefined4 *)(param_1 + 0x60));
          return;
        }
        (**(code **)(iVar4 + 0xd8))(param_1,0x296,5);
      }
    }
  }
  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)