Implemented OnEntityDismounted hook (Rust)

Discussion in 'Feature Suggestions' started by k1lly0u, Sep 23, 2017.

  1. k1lly0u

    k1lly0u Plugin Developer

    Code (C#):

        // BaseMountable
        public void DismountPlayer(BasePlayer player)
        {
            if (this._mounted == null)
            {
                return;
            }
            this._mounted.DismountObject();
            Vector3 dismountPosition = this.GetDismountPosition(player);
            this._mounted.transform.rotation = this.dismountAnchor.transform.rotation;
            this._mounted.MovePosition(dismountPosition);
            this._mounted.eyes.NetworkUpdate(this.dismountAnchor.transform.rotation);
            this._mounted.SendNetworkUpdateImmediate(false);
            this._mounted.ClientRPCPlayer(null, this._mounted, "ForcePositionTo", dismountPosition, null, null, null, null);
            this._mounted = null;
            base.SetFlag(BaseEntity.Flags.Busy, false, false);

            object[] objArray = new object[]{this, player };
            Interface.CallHook("OnEntityDismounted", objArray);
        }
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Implemented locally.