1. Code:
    // BaseEntity
    public virtual void OnFlagsChanged(global::BaseEntity.Flags old, global::BaseEntity.Flags next)
    {
        if (this.IsDebugging() && (old & global::BaseEntity.Flags.Debugging) != (next & global::BaseEntity.Flags.Debugging))
        {
            this.OnDebugStart();
        }
        // begin
        Interface.CallHook("OnEntityFlagsChanged", this, old, next);
        // end
    }