L L4D2node

CKeepUpright::Activate

0x007a3660 · 225 bytes · __thiscall

_ZN12CKeepUpright8ActivateEv

Decompiled

undefined (1 param)

/* CKeepUpright::Activate() */

void __thiscall CKeepUpright::Activate(CKeepUpright *this)

{
  uint uVar1;
  char *pcVar2;
  int iVar3;
  int *piVar4;
  undefined *puVar5;
  
  CBaseEntity::Activate((CBaseEntity *)this);
  piVar4 = *(int **)(this + 0x45c);
  if (piVar4 != (int *)0x0) {
    (**(code **)(*piVar4 + 8))(piVar4,this + 0x440);
    return;
  }
  uVar1 = *(uint *)(this + 0x464);
  if ((((uVar1 == 0xffffffff) ||
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar5 + 4) == 0)) {
    pcVar2 = "";
    if (*(char **)(this + 0x460) != (char *)0x0) {
      pcVar2 = *(char **)(this + 0x460);
    }
    iVar3 = FindPhysicsObjectByName(pcVar2,(CBaseEntity *)this);
  }
  else {
    iVar3 = *(int *)(*(int *)(puVar5 + 4) + 0x238);
  }
  if (iVar3 != 0) {
    piVar4 = (int *)(**(code **)(*physenv + 0x78))(physenv,this + 0x440);
    *(int **)(this + 0x45c) = piVar4;
    (**(code **)(*piVar4 + 0xc))(piVar4,iVar3,0);
    return;
  }
  UTIL_Remove((CBaseEntity *)this);
  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)