L L4D2node

CBaseEntity::FollowEntity

0x0040f600 · 176 bytes · __thiscall

_ZN11CBaseEntity12FollowEntityEPS_b

Decompiled

undefined (3 params)

/* CBaseEntity::FollowEntity(CBaseEntity*, bool) */

void __thiscall CBaseEntity::FollowEntity(CBaseEntity *this,CBaseEntity *param_1,bool param_2)

{
  if (param_1 != (CBaseEntity *)0x0) {
    (**(code **)(*(int *)this + 0x98))(this,param_1,0xffffffff);
    SetMoveType(this,0,0);
    if (param_2) {
      AddEffects(this,1);
    }
    CCollisionProperty::SetSolidFlags
              ((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 4));
    SetLocalOrigin(this,(Vector *)&vec3_origin);
    SetLocalAngles(this,(QAngle *)&vec3_angle);
    return;
  }
  StopFollowingEntity(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)