L L4D2node

CBasePlayer::SetPunchAngle

0x007b72c0 · 319 bytes · __thiscall

_ZN11CBasePlayer13SetPunchAngleERK6QAngle

Decompiled

undefined (2 params)

/* CBasePlayer::SetPunchAngle(QAngle const&) */

void __thiscall CBasePlayer::SetPunchAngle(CBasePlayer *this,QAngle *param_1)

{
  char cVar1;
  CBasePlayer *this_00;
  CBasePlayer *pCVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  if (((*(float *)param_1 == *(float *)(this + 0x1ab0)) &&
      (*(float *)(param_1 + 4) == *(float *)(this + 0x1ab4))) &&
     (*(float *)(param_1 + 8) == *(float *)(this + 0x1ab8))) {
    cVar1 = (**(code **)(*(int *)this + 300))(this);
  }
  else {
    (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1ab0);
    *(undefined4 *)(this + 0x1ab0) = *(undefined4 *)param_1;
    *(undefined4 *)(this + 0x1ab4) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(this + 0x1ab8) = *(undefined4 *)(param_1 + 8);
    cVar1 = (**(code **)(*(int *)this + 300))(this);
  }
  if (cVar1 != '\0') {
    iVar4 = 0;
    if (*(int *)(this + 0x30) != 0) {
      iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    if (0 < *(int *)(gpGlobals + 0x14)) {
      iVar5 = 1;
      do {
        this_00 = (CBasePlayer *)UTIL_PlayerByIndex(iVar5);
        if (((iVar5 != iVar4) && (this_00 != (CBasePlayer *)0x0)) &&
           ((pCVar2 = (CBasePlayer *)(**(code **)(*(int *)this_00 + 0x654))(this_00), this == pCVar2
            && (iVar3 = (**(code **)(*(int *)this_00 + 0x648))(this_00), iVar3 == 4)))) {
          SetPunchAngle(this_00,param_1);
        }
        iVar5 = iVar5 + 1;
      } while (iVar5 <= *(int *)(gpGlobals + 0x14));
    }
  }
  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)