L L4D2node

CBasePlayer::SetPunchAngle

0x007b7410 · 234 bytes · __thiscall

_ZN11CBasePlayer13SetPunchAngleEif

Decompiled

undefined (3 params)

/* CBasePlayer::SetPunchAngle(int, float) */

void __thiscall CBasePlayer::SetPunchAngle(CBasePlayer *this,int param_1,float param_2)

{
  QAngle *pQVar1;
  char cVar2;
  CBasePlayer *this_00;
  CBasePlayer *pCVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  pQVar1 = (QAngle *)(this + 0x1ab0);
  if (param_2 != *(float *)(pQVar1 + param_1 * 4)) {
    (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,pQVar1);
    *(float *)(pQVar1 + param_1 * 4) = param_2;
  }
  cVar2 = (**(code **)(*(int *)this + 300))(this);
  if (cVar2 != '\0') {
    iVar5 = 0;
    if (*(int *)(this + 0x30) != 0) {
      iVar5 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    if (0 < *(int *)(gpGlobals + 0x14)) {
      iVar6 = 1;
      do {
        this_00 = (CBasePlayer *)UTIL_PlayerByIndex(iVar6);
        if ((iVar6 != iVar5) && (this_00 != (CBasePlayer *)0x0)) {
          pCVar3 = (CBasePlayer *)(**(code **)(*(int *)this_00 + 0x654))(this_00);
          if (this == pCVar3) {
            iVar4 = (**(code **)(*(int *)this_00 + 0x648))(this_00);
            if (iVar4 == 4) {
              SetPunchAngle(this_00,pQVar1);
            }
          }
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 <= *(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)