L L4D2node

FindPassableSpace

0x00643800 · 276 bytes · __regparm3

_ZL17FindPassableSpaceP11CBaseEntityjRK6VectorfRS1_

Decompiled

undefined (5 params)

/* FindPassableSpace(CBaseEntity*, unsigned int, Vector const&, float, Vector&) */

undefined4 __regparm3
FindPassableSpace(CBaseEntity *param_1,uint param_2,Vector *param_3,float param_4,Vector *param_5)

{
  char cVar1;
  int iVar2;
  float in_XMM0_Da;
  float local_28;
  float local_24;
  float local_20;
  
  iVar2 = 100;
  while( true ) {
    if (((byte)param_1[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(param_1);
    }
    local_28 = *(float *)param_3 * in_XMM0_Da + *(float *)(param_1 + 0x2e0);
    local_24 = *(float *)(param_3 + 4) * in_XMM0_Da + *(float *)(param_1 + 0x2e4);
    local_20 = in_XMM0_Da * *(float *)(param_3 + 8) + *(float *)(param_1 + 0x2e8);
    CBaseEntity::SetAbsOrigin(param_1,(Vector *)&local_28);
    cVar1 = TestEntityPosition(param_1,param_2);
    if (cVar1 != '\0') break;
    iVar2 = iVar2 + -1;
    if (iVar2 == 0) {
      return 0;
    }
  }
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  *(undefined4 *)param_4 = *(undefined4 *)(param_1 + 0x2e0);
  *(undefined4 *)((int)param_4 + 4) = *(undefined4 *)(param_1 + 0x2e4);
  *(undefined4 *)((int)param_4 + 8) = *(undefined4 *)(param_1 + 0x2e8);
  return 1;
}

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)