private static void OnRemapRequest(ref RemapRequestMsg msg, MyNetworkClient sender) { MyEntity projectorEntity; MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity); var projector = projectorEntity as MyProjector; if (projector != null) { int randomSeed = MyRandom.Instance.CreateRandomSeed(); var seedMsg = new RemapSeedMsg(); seedMsg.EntityId = projector.EntityId; seedMsg.Seed = randomSeed; Sync.Layer.SendMessageToAllAndSelf(ref seedMsg, MyTransportMessageEnum.Success); } }
public void SendRemap() { var msg = new RemapRequestMsg(); msg.EntityId = m_projector.EntityId; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }