static void BeginShootSuccess(ref BeginShootMessage msg, MyNetworkClient sender) { MyUserControllableGun block = null; MyEntities.TryGetEntityById(msg.EntityId, out block); if (block != null) { block.BeginShoot(); } }
public void SendBeginShootMessage() { m_block.SyncRotationAndOrientation(); m_block.BeginShoot(); var msg = new BeginShootMessage(); msg.EntityId = m_block.EntityId; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Success); }
static void BeginShootSuccess(ref BeginShootMessage msg, MyNetworkClient sender) { MyUserControllableGun block = null; MyEntities.TryGetEntityById(msg.EntityId, out block); if (block != null) { block.BeginShoot(); if (Sync.IsServer) { Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success); } } }