L L4D2node

CCSPlayer::StartReplayMode

0x00660a20 · 390 bytes · __thiscall

_ZN9CCSPlayer15StartReplayModeEffi

Decompiled

undefined (4 params)

/* CCSPlayer::StartReplayMode(float, float, int) */

undefined4 __thiscall
CCSPlayer::StartReplayMode(CCSPlayer *this,float param_1,float param_2,int param_3)

{
  uint uVar1;
  undefined4 uVar2;
  int iVar3;
  undefined *puVar4;
  undefined **local_3c [11];
  
  uVar2 = CBasePlayer::StartReplayMode((CBasePlayer *)this,param_1,param_2,param_3);
  if ((char)uVar2 == '\0') {
    return uVar2;
  }
  CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
  local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
                    /* try { // try from 00660a81 to 00660a85 has its CatchHandler @ 00660bbf */
  CRecipientFilter::AddRecipient((CRecipientFilter *)local_3c,(CBasePlayer *)this);
                    /* try { // try from 00660a89 to 00660b85 has its CatchHandler @ 00660bd1 */
  CRecipientFilter::MakeReliable((CRecipientFilter *)local_3c);
  UserMessageBegin((IRecipientFilter *)local_3c,"KillCam");
  MessageWriteByte(4);
  uVar1 = *(uint *)(this + 0x1d7c);
  if ((((uVar1 == 0xffffffff) ||
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) {
    if (*(int *)(this + 0x30) == 0) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    MessageWriteByte(iVar3);
    MessageWriteByte(0);
  }
  else {
    iVar3 = *(int *)(*(int *)(puVar4 + 4) + 0x30);
    if (iVar3 == 0) {
      iVar3 = 0;
    }
    else {
      iVar3 = iVar3 - *(int *)(gpGlobals + 0x58) >> 4;
    }
    MessageWriteByte(iVar3);
    if (*(int *)(this + 0x30) == 0) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    MessageWriteByte(iVar3);
  }
  MessageEnd();
  ClientPrint((CBasePlayer *)this,4,"Kill Cam Replay",(char *)0x0,(char *)0x0,(char *)0x0,
              (char *)0x0);
  local_3c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
  CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
  return uVar2;
}

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)