L L4D2node

CBaseCombatWeapon::Lock

0x00409cd0 · 79 bytes · __thiscall

_ZN17CBaseCombatWeapon4LockEfP11CBaseEntity

Decompiled

undefined (3 params)

/* CBaseCombatWeapon::Lock(float, CBaseEntity*) */

void __thiscall CBaseCombatWeapon::Lock(CBaseCombatWeapon *this,float param_1,CBaseEntity *param_2)

{
  undefined4 *puVar1;
  
  *(float *)(this + 0x146c) = param_1 + *(float *)(gpGlobals + 0xc);
  if (param_2 != (CBaseEntity *)0x0) {
    puVar1 = (undefined4 *)(**(code **)(*(int *)param_2 + 0xc))(param_2);
    *(undefined4 *)(this + 0x1470) = *puVar1;
    return;
  }
  *(undefined4 *)(this + 0x1470) = 0xffffffff;
  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)