public override void UpdateBeforeSimulation() { if (!IsInit) { if (MyAPIGateway.Session == null) { return; } Init(); } else { GuidedMissileSingleton.Update(); if ((MyAPIGateway.Multiplayer.MultiplayerActive) && (MyAPIGateway.Multiplayer.IsServer)) { if (MyAPIGateway.Session.ElapsedPlayTime.Milliseconds % 2000 == 0) { int nextSeedNumber = _r.Next(100000); Int32Converter i = nextSeedNumber; byte[] byteArray = { i.Byte1, i.Byte2, i.Byte3, i.Byte4 }; MyAPIGateway.Multiplayer.SendMessageToOthers(2, byteArray); // Log.Info("sent message to others"); _r = new Random(nextSeedNumber); // Log.Info("created new random with Seed " + nextSeedNumber); } } } }