public void RequestVoxelPaintEllipsoid(Vector3 radius, MatrixD Transformation, byte material, PaintType Type) { var msg = new PaintEllipsoidMessage(); msg.EntityId = Entity.EntityId; msg.Radius = radius; msg.Type = Type; msg.Material = material; msg.Transformation = Transformation; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }
static void VoxelPaintEllipsoidSuccess(MySyncVoxel sync, ref PaintEllipsoidMessage msg, MyNetworkClient sender) { var voxel = sync.Entity as MyVoxelMap; if (voxel != null) { m_ellipsoidShape.Transformation = msg.Transformation; m_ellipsoidShape.Radius = msg.Radius; var amountChanged = UpdateVoxelShape(sync, msg.Type, m_ellipsoidShape, msg.Material); if (msg.Type == PaintType.Cut || msg.Type == PaintType.Fill) { MySession.Static.VoxelHandVolumeChanged += amountChanged; } } }
static void VoxelPaintEllipsoidRequest(MySyncVoxel sync, ref PaintEllipsoidMessage msg, MyNetworkClient sender) { var voxel = sync.Entity as MyVoxelMap; if (voxel != null) { m_ellipsoidShape.Transformation = msg.Transformation; m_ellipsoidShape.Radius = msg.Radius; if (CanPlaceInArea(msg.Type, m_ellipsoidShape)) { var amountChanged = UpdateVoxelShape(sync, msg.Type, m_ellipsoidShape, msg.Material); if (msg.Type == PaintType.Cut || msg.Type == PaintType.Fill) { MySession.Static.VoxelHandVolumeChanged += amountChanged; } Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success); } } }
static void VoxelPaintEllipsoidRequest(MySyncVoxel sync, ref PaintEllipsoidMessage msg, MyNetworkClient sender) { var voxel = sync.Entity as MyVoxelMap; if (voxel != null) { m_ellipsoidShape.Transformation = msg.Transformation; m_ellipsoidShape.Radius = msg.Radius; if (CanPlaceInArea(msg.Type, m_ellipsoidShape)) { var amountChanged = UpdateVoxelShape(sync, msg.Type, m_ellipsoidShape, msg.Material); if (msg.Type == PaintType.Cut || msg.Type == PaintType.Fill) MySession.Static.VoxelHandVolumeChanged += amountChanged; Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success); } } }
static void VoxelPaintEllipsoidSuccess(MySyncVoxel sync, ref PaintEllipsoidMessage msg, MyNetworkClient sender) { var voxel = sync.Entity as MyVoxelMap; if (voxel != null) { m_ellipsoidShape.Transformation = msg.Transformation; m_ellipsoidShape.Radius = msg.Radius; var amountChanged = UpdateVoxelShape(sync, msg.Type, m_ellipsoidShape, msg.Material); if (msg.Type == PaintType.Cut || msg.Type == PaintType.Fill) MySession.Static.VoxelHandVolumeChanged += amountChanged; } }
public void RequestVoxelPaintEllipsoid(Vector3 radius, MatrixD Transformation, byte material, PaintType Type) { var msg = new PaintEllipsoidMessage(); msg.EntityId = Entity.EntityId; msg.Radius = radius; msg.Type = Type; msg.Material = material; msg.Transformation = Transformation; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }