public void RazeBlockInCompoundBlock(List <Tuple <Vector3I, ushort> > locationsAndIds) { var msg = new RazeBlockInCompoundBlockMsg(); msg.GridEntityId = Entity.EntityId; msg.LocationsAndIds = locationsAndIds; Sync.Layer.SendAsRpcToServer(ref msg); }
private static void OnRazeBlockInCompoundBlockRequest(MySyncGrid sync, ref RazeBlockInCompoundBlockMsg msg, MyNetworkClient sender) { m_tmpLocationsAndIdsReceive.Clear(); Debug.Assert(m_tmpLocationsAndIdsReceive != msg.LocationsAndIds, "The raze block in compound block message was received via loopback using the same list. This causes erasing of the message."); var handler = sync.RazedBlockInCompoundBlock; if (handler != null) { handler(msg.LocationsAndIds, m_tmpLocationsAndIdsReceive); } if (Sync.IsServer && m_tmpLocationsAndIdsReceive.Count > 0) { // Broadcast to clients, use result collection msg.LocationsAndIds = m_tmpLocationsAndIdsReceive; Sync.Layer.SendAsRpcToAll(ref msg); } }
private static void OnRazeBlockInCompoundBlockRequest(MySyncGrid sync, ref RazeBlockInCompoundBlockMsg msg, MyNetworkClient sender) { m_tmpLocationsAndIdsReceive.Clear(); Debug.Assert(m_tmpLocationsAndIdsReceive != msg.LocationsAndIds, "The raze block in compound block message was received via loopback using the same list. This causes erasing of the message."); var handler = sync.RazedBlockInCompoundBlock; if (handler != null) handler(msg.LocationsAndIds, m_tmpLocationsAndIdsReceive); if (Sync.IsServer && m_tmpLocationsAndIdsReceive.Count > 0) { // Broadcast to clients, use result collection msg.LocationsAndIds = m_tmpLocationsAndIdsReceive; Sync.Layer.SendMessageToAll(ref msg); } }
public void RazeBlockInCompoundBlock(List<Tuple<Vector3I, ushort>> locationsAndIds) { var msg = new RazeBlockInCompoundBlockMsg(); msg.GridEntityId = Entity.EntityId; msg.LocationsAndIds = locationsAndIds; Sync.Layer.SendMessageToServer(ref msg); }