L L4D2node

PhysHasContactWithOtherInDirection

0x00493f70 · 199 bytes · __cdecl

_Z34PhysHasContactWithOtherInDirectionP14IPhysicsObjectRK6Vector

Decompiled

undefined (2 params)

/* PhysHasContactWithOtherInDirection(IPhysicsObject*, Vector const&) */

undefined4 PhysHasContactWithOtherInDirection(IPhysicsObject *param_1,Vector *param_2)

{
  char cVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  int iVar5;
  undefined4 uVar6;
  float local_28;
  float local_24;
  float local_20;
  
  iVar2 = (**(code **)(*(int *)param_1 + 0x48))(param_1);
  piVar3 = (int *)(**(code **)(*(int *)param_1 + 0x144))(param_1);
  do {
    cVar1 = (**(code **)(*piVar3 + 8))(piVar3);
    if (cVar1 == '\0') {
      uVar6 = 0;
LAB_00494014:
      (**(code **)(*(int *)param_1 + 0x148))(param_1,piVar3);
      return uVar6;
    }
    piVar4 = (int *)(**(code **)(*piVar3 + 0xc))(piVar3,1);
    iVar5 = (**(code **)(*piVar4 + 0x48))(piVar4);
    if (iVar2 != iVar5) {
      (**(code **)(*piVar3 + 0x18))(piVar3,&local_28);
      if (0.0 < *(float *)(param_2 + 4) * local_24 + *(float *)param_2 * local_28 +
                *(float *)(param_2 + 8) * local_20) {
        uVar6 = 1;
        goto LAB_00494014;
      }
    }
    (**(code **)(*piVar3 + 0x34))(piVar3);
  } while( true );
}

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)