L L4D2node

CVEngineServer::CrosshairAngle

0x0022bc60 · 291 bytes · __cdecl

_ZN14CVEngineServer14CrosshairAngleEPK7edict_tff

Decompiled

undefined (3 params)

/* CVEngineServer::CrosshairAngle(edict_t const*, float, float) */

void CVEngineServer::CrosshairAngle(edict_t *param_1,float param_2,float param_3)

{
  int iVar1;
  int *piVar2;
  undefined **local_64;
  undefined1 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined8 local_50;
  undefined4 local_48;
  undefined4 local_44;
  undefined8 local_40;
  undefined4 local_38;
  undefined4 local_34;
  undefined1 local_30;
  undefined8 local_2c;
  undefined4 local_24;
  undefined4 local_20;
  float local_18;
  undefined4 local_14;
  
  iVar1 = NUM_FOR_EDICT((edict_t *)param_2);
  if ((iVar1 < 1) || (DAT_003b8080 < iVar1)) {
    Host_Error("DLL_Crosshairangle: not a client");
  }
  iVar1 = *(int *)(DAT_003b8074 + -4 + iVar1 * 4);
  piVar2 = (int *)0x0;
  if (iVar1 != 0) {
    piVar2 = (int *)(iVar1 + 4);
  }
  if (180.0 < param_3) {
    param_3 = param_3 - 360.0;
  }
  if (param_3 < -180.0) {
    param_3 = param_3 + 360.0;
  }
  local_58 = 0;
  local_54 = 0;
  local_50 = 0;
  local_48 = 0;
  local_44 = 0;
  local_40 = 0;
  local_38 = 0;
  local_34 = 0;
  local_30 = 0;
  local_2c = 0;
  local_24 = 0;
  local_20 = 0;
  local_60 = 1;
  local_5c = 0;
  local_64 = &PTR__SVC_CrosshairAngle_002a1a08;
  local_14 = 0;
  local_18 = param_3;
  (**(code **)(*piVar2 + 0x78))(piVar2,&local_64,0,0);
  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)