L L4D2node

Studio_GetController

0x00b94550 · 125 bytes · __cdecl

_Z20Studio_GetControllerPK10CStudioHdrif

Decompiled

undefined (3 params)

/* Studio_GetController(CStudioHdr const*, int, float) */

longdouble Studio_GetController(CStudioHdr *param_1,int param_2,float param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (param_1 != (CStudioHdr *)0x0) {
    iVar1 = *(int *)param_1;
    if (0 < *(int *)(iVar1 + 0xa4)) {
      iVar3 = iVar1 + *(int *)(iVar1 + 0xa8);
      if (param_2 != *(int *)(iVar3 + 0x14)) {
        iVar4 = 0;
        iVar2 = iVar1 + 0x38 + *(int *)(iVar1 + 0xa8);
        do {
          iVar3 = iVar2;
          iVar4 = iVar4 + 1;
          if (iVar4 == *(int *)(iVar1 + 0xa4)) goto LAB_00b94599;
          iVar2 = iVar3 + 0x38;
        } while (param_2 != *(int *)(iVar3 + 0x14));
      }
      return (longdouble)
             ((*(float *)(iVar3 + 0xc) - *(float *)(iVar3 + 8)) * param_3 + *(float *)(iVar3 + 8));
    }
  }
LAB_00b94599:
  return (longdouble)0.0;
}

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)