L L4D2node

CBaseAnimating::TestCollision

0x005de590 · 262 bytes · __thiscall

_ZN14CBaseAnimating13TestCollisionERK5Ray_tjR10CGameTrace

Decompiled

undefined (4 params)

/* CBaseAnimating::TestCollision(Ray_t const&, unsigned int, CGameTrace&) */

uint __thiscall
CBaseAnimating::TestCollision(CBaseAnimating *this,Ray_t *param_1,uint param_2,CGameTrace *param_3)

{
  CGameTrace CVar1;
  int *piVar2;
  uint uVar3;
  undefined4 uVar4;
  undefined1 local_34 [12];
  undefined1 local_28 [24];
  
  if (*(float *)(this + 0x464) == 1.0) {
    uVar3 = 0;
    if (((byte)this[0x1b4] & 1) != 0) {
      uVar3 = (**(code **)(*(int *)this + 0x44))(this,param_1,param_2,param_3);
      if ((char)uVar3 == '\0') {
        return 1;
      }
      if ((1.0 < *(float *)(param_3 + 0x2c) || *(float *)(param_3 + 0x2c) == 1.0) &&
         (uVar3 = (uint)(byte)param_3[0x36], param_3[0x36] == (CGameTrace)0x0)) {
        CVar1 = param_3[0x37];
        goto LAB_005de604;
      }
    }
  }
  else {
    piVar2 = *(int **)(this + 0x238);
    (**(code **)(*piVar2 + 0xc4))(piVar2,local_34,local_28);
    uVar4 = (**(code **)(*piVar2 + 300))(piVar2);
    (**(code **)(*physcollision + 0x84))(physcollision,param_1,uVar4,local_34,local_28,param_3);
    uVar3 = 1;
    if ((1.0 < *(float *)(param_3 + 0x2c) || *(float *)(param_3 + 0x2c) == 1.0) &&
       (param_3[0x36] == (CGameTrace)0x0)) {
      CVar1 = param_3[0x37];
LAB_005de604:
      return (uint)(byte)CVar1;
    }
  }
  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)