L L4D2node

CPhysForce::Activate

0x007a40d0 · 262 bytes · __thiscall

_ZN10CPhysForce8ActivateEv

Decompiled

undefined (1 param)

/* CPhysForce::Activate() */

void __thiscall CPhysForce::Activate(CPhysForce *this)

{
  uint uVar1;
  char *pcVar2;
  int *piVar3;
  undefined4 *puVar4;
  undefined *puVar5;
  
  CBaseEntity::Activate((CBaseEntity *)this);
  piVar3 = *(int **)(this + 0x440);
  if (piVar3 != (int *)0x0) {
    (**(code **)(*piVar3 + 0x20))(piVar3);
  }
  if (this[0x454] == (CPhysForce)0x0) {
    uVar1 = *(uint *)(this + 0x450);
    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 + 0x444) != (char *)0x0) {
        pcVar2 = *(char **)(this + 0x444);
      }
      piVar3 = (int *)CGlobalEntityList::FindEntityByName
                                ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar2,
                                 (CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                                 (IEntityFindFilter *)0x0);
      if (piVar3 == (int *)0x0) {
        *(undefined4 *)(this + 0x450) = 0xffffffff;
      }
      else {
        puVar4 = (undefined4 *)(**(code **)(*piVar3 + 0xc))(piVar3);
        *(undefined4 *)(this + 0x450) = *puVar4;
      }
    }
    (**(code **)(*(int *)this + 0x328))(this);
    if ((((byte)this[0x148] & 1) != 0) && (*(int *)(this + 0x440) == 0)) {
      ForceOn(this);
      return;
    }
  }
  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)