L L4D2node

CPhysicsProp::ComputeEnablingImpulse

0x007f1850 · 442 bytes · __thiscall

_ZN12CPhysicsProp22ComputeEnablingImpulseEiP21gamevcollisionevent_t

Decompiled

undefined (3 params)

/* CPhysicsProp::ComputeEnablingImpulse(int, gamevcollisionevent_t*) */

void __thiscall
CPhysicsProp::ComputeEnablingImpulse(CPhysicsProp *this,int param_1,gamevcollisionevent_t *param_2)

{
  gamevcollisionevent_t *pgVar1;
  float fVar2;
  int *piVar3;
  int iVar4;
  longdouble lVar5;
  undefined1 local_64 [12];
  float local_58;
  float local_54;
  float local_50;
  float local_4c;
  float local_48;
  float local_44;
  float local_40;
  float local_3c;
  float local_38;
  Vector local_34 [12];
  float local_28;
  float local_24;
  float local_20;
  
  (**(code **)(**(int **)(param_2 + 0x1c) + 4))(*(int **)(param_2 + 0x1c),local_64);
  piVar3 = *(int **)(param_2 + (uint)(param_1 == 0) * 4);
  (**(code **)(*piVar3 + 0xe8))(piVar3,&local_58,local_64);
  (**(code **)(*piVar3 + 0xb8))((Vector *)&local_28,piVar3);
  local_58 = local_58 - local_28;
  iVar4 = (uint)(param_1 == 0) * 0xc;
  local_54 = local_54 - local_24;
  pgVar1 = param_2 + iVar4 + 0x50;
  local_50 = local_50 - local_20;
  local_4c = *(float *)(pgVar1 + 4) * 0.017453292 * local_50 -
             *(float *)(pgVar1 + 8) * 0.017453292 * local_54;
  local_48 = *(float *)(pgVar1 + 8) * 0.017453292 * local_58 -
             local_50 * *(float *)pgVar1 * 0.017453292;
  local_44 = local_54 * *(float *)pgVar1 * 0.017453292 -
             local_58 * *(float *)(pgVar1 + 4) * 0.017453292;
  (**(code **)(*piVar3 + 0xec))(piVar3,&local_40,&local_4c);
  pgVar1 = param_2 + iVar4 + 0x20;
  local_40 = local_40 + *(float *)pgVar1;
  local_3c = local_3c + *(float *)(pgVar1 + 4);
  local_38 = local_38 + *(float *)(pgVar1 + 8);
  lVar5 = (longdouble)(**(code **)(*piVar3 + 0x78))(piVar3);
  fVar2 = (float)lVar5;
  local_40 = local_40 * fVar2;
  piVar3 = *(int **)(param_2 + param_1 * 4);
  local_3c = local_3c * fVar2;
  local_38 = fVar2 * local_38;
  (**(code **)(*piVar3 + 0x100))(piVar3,&local_40,local_64,local_34,(Vector *)&local_28);
  PhysCallbackImpulse(*(IPhysicsObject **)(param_2 + param_1 * 4),local_34,(Vector *)&local_28);
  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)