private static void OnBuildBlocksAreaSuccess(MySyncGrid sync, ref BuildBlocksAreaSuccessMsg successMsg, MyNetworkClient sender) { Debug.Assert(sync.BlocksBuiltAreaSuccess != null, "Handler should not be null, build messages will be ignored!"); var handler = sync.BlocksBuiltAreaSuccess; if (handler != null) handler(ref successMsg.Area, successMsg.EntityIdSeed, successMsg.FailList, successMsg.OwnerId); }
public void BuildBlocksSuccess(ref MyCubeGrid.MyBlockBuildArea area, HashSet<Vector3UByte> failList, long ownerId, int entityIdSeed) { if (Sync.IsServer) { var successMsg = new BuildBlocksAreaSuccessMsg(); successMsg.GridEntityId = Entity.EntityId; successMsg.Area = area; successMsg.OwnerId = ownerId; successMsg.EntityIdSeed = entityIdSeed; successMsg.FailList = failList; Sync.Layer.SendMessageToAll(ref successMsg); } }