L L4D2node

CGameTimescale::SetDesiredTimescale

0x004658d0 · 232 bytes · __thiscall

_ZN14CGameTimescale19SetDesiredTimescaleEffff

Decompiled

undefined (5 params)

/* CGameTimescale::SetDesiredTimescale(float, float, float, float) */

void __thiscall
CGameTimescale::SetDesiredTimescale
          (CGameTimescale *this,float param_1,float param_2,float param_3,float param_4)

{
  undefined **local_2c [8];
  
  if ((((param_1 != *(float *)(this + 0xc)) || (param_2 != *(float *)(this + 0x18))) ||
      (param_3 != *(float *)(this + 0x1c))) || (param_4 != *(float *)(this + 0x20))) {
    *(float *)(this + 0xc) = param_1;
    *(float *)(this + 0x18) = param_2;
    *(float *)(this + 0x1c) = param_3;
    *(float *)(this + 0x20) = param_4;
    CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_2c);
    local_2c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
                    /* try { // try from 00465928 to 0046592c has its CatchHandler @ 004659bd */
    CRecipientFilter::AddAllPlayers((CRecipientFilter *)local_2c);
    local_2c[0] = &PTR__CReliableBroadcastRecipientFilter_00c157a8;
                    /* try { // try from 00465937 to 0046593b has its CatchHandler @ 004659e8 */
    CRecipientFilter::MakeReliable((CRecipientFilter *)local_2c);
                    /* try { // try from 00465947 to 0046598c has its CatchHandler @ 004659cf */
    UserMessageBegin((IRecipientFilter *)local_2c,"DesiredTimescale");
    MessageWriteFloat(*(float *)(this + 0xc));
    MessageWriteFloat(*(float *)(this + 0x18));
    MessageWriteFloat(*(float *)(this + 0x1c));
    MessageWriteFloat(*(float *)(this + 0x20));
    MessageEnd();
    local_2c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
    CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_2c);
  }
  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)