L L4D2node

CBaseEntity::SetNextThink

0x00410c90 · 135 bytes · __thiscall

_ZN11CBaseEntity12SetNextThinkEif

Decompiled

undefined (3 params)

/* CBaseEntity::SetNextThink(int, float) */

void __thiscall CBaseEntity::SetNextThink(CBaseEntity *this,int param_1,float param_2)

{
  int iVar1;
  bool bVar2;
  
  if (param_2 == -1.0) {
    bVar2 = false;
    iVar1 = -1;
  }
  else {
    iVar1 = (int)(param_2 / *(float *)(gpGlobals + 0x1c) + 0.5);
    bVar2 = iVar1 != -1;
  }
  if (param_1 < 0) {
    SetNextThink(this,param_2,(char *)0x0);
  }
  else {
    *(int *)(param_1 * 0x14 + *(int *)(this + 0xa4) + 0xc) = iVar1;
  }
  CheckHasThinkFunction(this,bVar2);
  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)