private void DoIndependentMod(byte[] binary)
        {
            IIndependentModifier m = Serialisation.To <IIndependentModifier>(binary);

            PingSimulator.Delay(() => {
                EM.ApplyMod(m, DistributeBetweenPlayersAsyncFilter);
            });
        }
        private void DoIndependentModWithConfirmation(object[] args)
        {
            int sourcePlayerID;
            IIndependentModifier m;
            int  requestID;
            long targetStep;

            Serialisation.ToObjects(args, out sourcePlayerID, out m, out requestID, out targetStep);

            PingSimulator.Delay(() => {
                EM.ApplyMod(m, DistributeBetweenPlayersAsyncFilter);
                View.RPC("ConfirmModExecuted", PhotonNetwork.playerList[sourcePlayerID - 1], PhotonNetwork.player.ID, requestID);
            });
        }
        private void DoEntityDependentMod(object[] args)
        {
            IEntity         e;
            IEntityModifier m;

            Serialisation.ToObjects(args, out e, out m);

            PingSimulator.Delay(() => {
                m.e = e;
                EM.RefreshEntityOnModifierUsingUID(m);

                EM.ApplyMod(m, DistributeBetweenPlayersAsyncFilter);
            });
        }
        private void DoEntityDependentModWithConfirmation(object[] args)
        {
            int             sourcePlayerID;
            IEntityModifier m;
            int             requestID;
            long            targetStep;

            Serialisation.ToObjects(args, out sourcePlayerID, out m, out requestID, out targetStep);

            PingSimulator.Delay(() => {
                // If the modifier holds an entity value, retrieve it from its local registry using its UID
                EM.RefreshEntityOnModifierUsingUID(m);

                EM.ApplyMod(m, DistributeBetweenPlayersAsyncFilter);
                View.RPC("ConfirmModExecuted", PhotonNetwork.playerList[sourcePlayerID - 1], PhotonNetwork.player.ID, requestID);
            });
        }