Example #1
0
        private void EndShootInternal(MyShootActionEnum action = MyShootActionEnum.PrimaryAction)
        {
            ShootEndMsg msg = new ShootEndMsg();

            msg.EntityId = SyncedEntityId;
            msg.Action   = action;

            MySession.Static.SyncLayer.SendMessageToServer(ref msg);

            StopShooting(action);
        }
Example #2
0
        static void ShootEndCallback(MySyncControllableEntity sync, ref ShootEndMsg msg, MyNetworkClient sender)
        {
            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
            }

            bool wouldCallStopTwice = Sync.IsServer && sender.IsGameServer();

            if (!wouldCallStopTwice)
            {
                sync.StopShooting(msg.Action);
            }
        }
        static void ShootEndCallback(MySyncControllableEntity sync, ref ShootEndMsg msg, MyNetworkClient sender)
        {
            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
            }

            bool wouldCallStopTwice = Sync.IsServer && sender.IsGameServer();
            if (!wouldCallStopTwice)
                sync.StopShooting(msg.Action);
        }
        private void EndShootInternal(MyShootActionEnum action = MyShootActionEnum.PrimaryAction)
        {
            ShootEndMsg msg = new ShootEndMsg();
            msg.EntityId = SyncedEntityId;
            msg.Action = action;

            MySession.Static.SyncLayer.SendMessageToServer(ref msg);

            StopShooting(action);
        }