L L4D2node

GetMaterialParameters

0x0043a950 · 185 bytes · __cdecl

_Z21GetMaterialParametersiRfS_

Decompiled

undefined (3 params)

/* GetMaterialParameters(int, float&, float&) */

void GetMaterialParameters(int param_1,float *param_2,float *param_3)

{
  switch(param_1) {
  case 0x43:
    *param_2 = 0.4;
    *param_3 = 0.25;
    return;
  case 0x44:
  case 0x4d:
    *param_2 = 0.5;
    *param_3 = 0.3;
    return;
  default:
    *param_2 = 1.0;
    *param_3 = 0.5;
    return;
  case 0x47:
    *param_2 = 1.0;
    *param_3 = 0.99;
    return;
  case 0x50:
    *param_2 = 0.4;
    *param_3 = 0.45;
    return;
  case 0x54:
    *param_2 = 0.65;
    *param_3 = 0.3;
    return;
  case 0x56:
    *param_2 = 0.5;
    *param_3 = 0.45;
    return;
  case 0x57:
    *param_2 = 1.0;
    *param_3 = 0.6;
    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)