L L4D2node

CBaseEntity::ScriptThink

0x00610ba0 · 367 bytes · __thiscall

_ZN11CBaseEntity11ScriptThinkEv

Decompiled

undefined (1 param)

/* CBaseEntity::ScriptThink() */

void __thiscall CBaseEntity::ScriptThink(CBaseEntity *this)

{
  char cVar1;
  undefined4 uVar2;
  char *pcVar3;
  undefined1 *puVar4;
  undefined1 local_34 [12];
  void *local_28 [2];
  ushort local_20;
  ushort local_1e;
  
  local_1e = 0;
  local_20 = 0;
  local_28[0] = (void *)0x0;
  pcVar3 = "";
  if (*(char **)(this + 0x3e4) != (char *)0x0) {
    pcVar3 = *(char **)(this + 0x3e4);
  }
                    /* try { // try from 00610be5 to 00610cb2 has its CatchHandler @ 00610d36 */
  cVar1 = CallScriptFunction(this,pcVar3,(CVariantBase *)local_28,false);
  if (cVar1 == '\0') {
    puVar4 = &DAT_00d539c2;
    if (*(undefined1 **)(this + 0x3e4) != (undefined1 *)0x0) {
      puVar4 = *(undefined1 **)(this + 0x3e4);
    }
    uVar2 = GetDebugName(this);
    DevWarning("%s FAILED to call script think function %s!\n",uVar2,puVar4);
  }
  else {
    switch(local_20) {
    case 1:
      break;
    default:
      pcVar3 = "unknown_variant_type";
      if (local_20 < 0x29) {
        pcVar3 = *(char **)(CSWTCH_1969 + (uint)local_20 * 4);
      }
      Warning("No conversion from %s to float now\n",pcVar3);
    case 0:
      break;
    case 5:
      break;
    case 6:
      break;
    case 0x23:
      break;
    case 0x26:
    }
    ThinkSet((_func_void *)local_34,(float)this,(char *)ScriptThink);
  }
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  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)