L L4D2node

SV_SolidMoved

0x0023ef50 · 1165 bytes · __cdecl

_Z13SV_SolidMovedP7edict_tP12ICollideablePK6Vectorb

Decompiled

undefined (4 params)

/* SV_SolidMoved(edict_t*, ICollideable*, Vector const*, bool) */

void SV_SolidMoved(edict_t *param_1,ICollideable *param_2,Vector *param_3,bool param_4)

{
  float *pfVar1;
  int *piVar2;
  int iVar3;
  float local_b4;
  float local_b0;
  float local_ac;
  float local_a8;
  float local_a4;
  float local_a0;
  undefined **local_9c [4];
  float local_8c;
  float local_88;
  float local_84;
  float local_7c;
  float local_78;
  float local_74;
  float local_6c;
  float local_68;
  float local_64;
  float local_5c;
  float local_58;
  float local_54;
  undefined4 local_4c;
  undefined1 local_48;
  undefined1 local_47;
  edict_t *local_3c;
  ICollideable *local_38;
  void *local_34;
  undefined4 local_30;
  undefined4 local_2c;
  int local_28;
  void *local_24;
  
  local_30 = 8;
  local_2c = 8;
  local_9c[0] = &PTR_EnumElement_002cadb0;
  if (param_3 == (Vector *)0x0) {
    local_34 = malloc(0x20);
    local_28 = 0;
    local_3c = param_1;
    local_24 = local_34;
    if ((((byte)*param_1 & 4) == 0) || (piVar2 = *(int **)(param_1 + 0xc), piVar2 == (int *)0x0)) {
      local_38 = (ICollideable *)0x0;
    }
    else {
                    /* try { // try from 0023f20e to 0023f23b has its CatchHandler @ 0023f3ea */
      local_38 = (ICollideable *)(**(code **)(*piVar2 + 0x10))(piVar2);
    }
    CM_GetCollideableTriggerTestBox(local_38,(Vector *)&local_b4,(Vector *)&local_a8,param_4);
    pfVar1 = (float *)(**(code **)(*(int *)local_38 + 0x20))(local_38);
    local_7c = 0.0;
    local_78 = 0.0;
    local_47 = 0;
    local_74 = 0.0;
    local_4c = 0;
    local_58 = (local_a4 - local_b0) * 0.5;
    local_5c = (local_a8 - local_b4) * 0.5;
    local_54 = (local_a0 - local_ac) * 0.5;
    local_68 = (local_a4 + local_b0) * 0.5;
    local_6c = (local_a8 + local_b4) * 0.5;
    local_64 = (local_a0 + local_ac) * 0.5;
    local_48 = local_58 * local_58 + local_5c * local_5c + local_54 * local_54 < 1e-06;
    local_8c = *pfVar1 + local_6c;
    local_88 = pfVar1[1] + local_68;
    local_84 = pfVar1[2] + local_64;
    local_6c = -local_6c;
    local_68 = -local_68;
    local_64 = -local_64;
                    /* try { // try from 0023f373 to 0023f3d5 has its CatchHandler @ 0023f40f */
    (**(code **)(*(int *)param_2 + 0x3c))(param_2,(Vector *)&local_b4,(Vector *)&local_a8);
    piVar2 = (int *)SpatialPartition();
    (**(code **)(*piVar2 + 0x38))(piVar2,2,(Vector *)&local_b4,(Vector *)&local_a8,0,local_9c);
    iVar3 = 0;
    if (0 < local_28) {
      do {
        (**(code **)(*serverGameEnts + 8))
                  (serverGameEnts,*(undefined4 *)((int)local_34 + iVar3 * 4),local_3c);
        iVar3 = iVar3 + 1;
      } while (iVar3 < local_28);
    }
  }
  else {
    local_34 = malloc(0x20);
    local_28 = 0;
    local_3c = param_1;
    local_24 = local_34;
    if ((((byte)*param_1 & 4) == 0) || (piVar2 = *(int **)(param_1 + 0xc), piVar2 == (int *)0x0)) {
      local_38 = (ICollideable *)0x0;
    }
    else {
                    /* try { // try from 0023f1d0 to 0023f1d2 has its CatchHandler @ 0023f3ff */
      local_38 = (ICollideable *)(**(code **)(*piVar2 + 0x10))(piVar2);
    }
                    /* try { // try from 0023efc3 to 0023efd2 has its CatchHandler @ 0023f3ff */
    CM_GetCollideableTriggerTestBox(local_38,(Vector *)&local_b4,(Vector *)&local_a8,param_4);
    pfVar1 = (float *)(**(code **)(*(int *)local_38 + 0x20))(local_38);
    local_7c = *pfVar1 - *(float *)param_3;
    local_78 = pfVar1[1] - *(float *)(param_3 + 4);
    local_4c = 0;
    local_74 = pfVar1[2] - *(float *)(param_3 + 8);
    local_47 = local_78 * local_78 + local_7c * local_7c + local_74 * local_74 != 0.0;
    local_5c = (local_a8 - local_b4) * 0.5;
    local_58 = (local_a4 - local_b0) * 0.5;
    local_54 = (local_a0 - local_ac) * 0.5;
    local_6c = (local_a8 + local_b4) * 0.5;
    local_8c = *(float *)param_3 + local_6c;
    local_48 = local_58 * local_58 + local_5c * local_5c + local_54 * local_54 < 1e-06;
    local_64 = (local_ac + local_a0) * 0.5;
    local_68 = (local_b0 + local_a4) * 0.5;
    local_84 = *(float *)(param_3 + 8) + local_64;
    local_6c = -local_6c;
    local_88 = *(float *)(param_3 + 4) + local_68;
    local_68 = -local_68;
    local_64 = -local_64;
                    /* try { // try from 0023f121 to 0023f17d has its CatchHandler @ 0023f401 */
    piVar2 = (int *)SpatialPartition();
    (**(code **)(*piVar2 + 0x40))(piVar2,2,&local_8c,0,local_9c);
    iVar3 = 0;
    if (0 < local_28) {
      do {
        (**(code **)(*serverGameEnts + 8))
                  (serverGameEnts,*(undefined4 *)((int)local_34 + iVar3 * 4),local_3c);
        iVar3 = iVar3 + 1;
      } while (iVar3 < local_28);
    }
  }
  local_28 = 0;
  local_9c[0] = &PTR_EnumElement_002cadb0;
  CUtlMemory<edict_t*,int>::Purge((CUtlMemory<edict_t*,int> *)&local_34);
  local_24 = local_34;
  CUtlMemory<edict_t*,int>::Purge((CUtlMemory<edict_t*,int> *)&local_34);
  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)