Ejemplo n.º 1
0
        public static void RemoveFracturePiece(long entityId, float blendTime)
        {
            var msg = new RemoveFracturePieceMsg();

            msg.EntityId  = entityId;
            msg.BlendTime = blendTime;
            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }
Ejemplo n.º 2
0
        static void OnRemoveFracturePieceMessage(ref RemoveFracturePieceMsg msg, MyNetworkClient sender)
        {
            MyFracturedPiece fracturePiece;

            if (MyEntities.TryGetEntityById(msg.EntityId, out fracturePiece))
            {
                MyFracturedPiecesManager.Static.RemoveFracturePiece(fracturePiece, msg.BlendTime, fromServer: true, sync: false);
            }
            else
            {
                System.Diagnostics.Debug.Fail("Not existing fracture piece");
            }
        }
Ejemplo n.º 3
0
        static void OnRemoveFracturePieceMessage(ref RemoveFracturePieceMsg msg, MyNetworkClient sender)
        {
            Debug.Assert(!Sync.IsServer);

            MyFracturedPiece fracturePiece;
            if (MyEntities.TryGetEntityById(msg.EntityId, out fracturePiece))
            {
                MyFracturedPiecesManager.Static.RemoveFracturePiece(fracturePiece, msg.BlendTime, fromServer: true, sync: false);
            }
            else
            {
                System.Diagnostics.Debug.Fail("Not existing fracture piece");
            }
        }
Ejemplo n.º 4
0
        public static void RemoveFracturePiece(long entityId, float blendTime)
        {
            Debug.Assert(Sync.IsServer);

            var msg = new RemoveFracturePieceMsg();
            msg.EntityId = entityId;
            msg.BlendTime = blendTime;
            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }