L L4D2node

CBaseEntity::SetNextThink

0x00410ba0 · 229 bytes · __thiscall

_ZN11CBaseEntity12SetNextThinkEfPKc

Decompiled

undefined (3 params)

/* CBaseEntity::SetNextThink(float, char const*) */

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

{
  int iVar1;
  int iVar2;
  bool bVar3;
  
  if (param_1 == -1.0) {
    bVar3 = false;
    iVar2 = -1;
  }
  else {
    iVar2 = (int)(param_1 / *(float *)(gpGlobals + 0x1c) + 0.5);
    if ((iVar2 != 0) || (param_1 <= 0.0)) {
      bVar3 = iVar2 != -1;
    }
    else {
      bVar3 = true;
      iVar2 = 1;
    }
  }
  if (param_2 == (char *)0x0) {
    if (iVar2 != *(int *)(this + 0xd0)) {
      (**(code **)(*(int *)this + 0xec))(this,this + 0xd0);
      *(int *)(this + 0xd0) = iVar2;
    }
  }
  else {
    iVar1 = GetIndexForThinkContext(this,param_2);
    if (iVar1 == -1) {
      iVar1 = RegisterThinkContext(this,param_2);
    }
    *(int *)(*(int *)(this + 0xa4) + iVar1 * 0x14 + 0xc) = iVar2;
  }
  CheckHasThinkFunction(this,bVar3);
  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)