L L4D2node

SetupLightNormalFromProps

0x00592bc0 · 374 bytes · __cdecl

_Z25SetupLightNormalFromPropsRK6QAngleffR6Vector

Decompiled

undefined (4 params)

/* SetupLightNormalFromProps(QAngle const&, float, float, Vector&) */

void SetupLightNormalFromProps(QAngle *param_1,float param_2,float param_3,Vector *param_4)

{
  float fVar1;
  float local_30;
  double local_2c;
  double local_24 [2];
  
  fVar1 = 0.0;
  if (param_2 == -1.0) {
    *(undefined4 *)(param_4 + 4) = 0;
    *(undefined4 *)param_4 = 0;
    *(undefined4 *)(param_4 + 8) = 0x3f800000;
  }
  else {
    if (param_2 != -2.0) {
      if (param_2 == 0.0) {
        param_2 = *(float *)(param_1 + 4);
      }
      *(undefined4 *)(param_4 + 8) = 0;
      sincos((double)(param_2 * 0.0055555557) * 3.141592653589793,local_24,&local_2c);
      fVar1 = (float)local_2c;
      *(float *)param_4 = fVar1;
      local_30 = (float)local_24[0];
      *(float *)(param_4 + 4) = local_30;
      goto LAB_00592c18;
    }
    *(undefined4 *)(param_4 + 4) = 0;
    *(undefined4 *)param_4 = 0;
    *(undefined4 *)(param_4 + 8) = 0xbf800000;
  }
  local_30 = 0.0;
LAB_00592c18:
  if (param_3 == 0.0) {
    param_3 = *(float *)param_1;
  }
  sincos((double)(param_3 * 0.0055555557) * 3.141592653589793,local_24,&local_2c);
  *(float *)(param_4 + 8) = (float)local_24[0];
  *(float *)param_4 = fVar1 * (float)local_2c;
  *(float *)(param_4 + 4) = (float)local_2c * local_30;
  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)