From 7e3a4b18c06cd25b6ca5d93edaa6e6d170bdcf9a Mon Sep 17 00:00:00 2001 From: MayNL Date: Fri, 3 Jul 2026 17:51:59 -0400 Subject: [PATCH] Fix crash when exporting PSM files --- PckStudio.ModelSupport/Format/Internal/PSM/PSMFileWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PckStudio.ModelSupport/Format/Internal/PSM/PSMFileWriter.cs b/PckStudio.ModelSupport/Format/Internal/PSM/PSMFileWriter.cs index 3f240781..4cfb3add 100644 --- a/PckStudio.ModelSupport/Format/Internal/PSM/PSMFileWriter.cs +++ b/PckStudio.ModelSupport/Format/Internal/PSM/PSMFileWriter.cs @@ -60,7 +60,7 @@ namespace PckStudio.ModelSupport.Internal.Format byte uvX = (byte)MathHelper.Clamp((int)part.UV.X, 0, 64); byte uvY = (byte)MathHelper.Clamp((int)part.UV.Y, 0, 64); byte mirrorAndUvX = (byte)(Convert.ToByte(part.Mirror) << 7 | uvX); - byte hideWithArmorAndUvY = (byte)(Convert.ToByte(part.ArmorMaskFlags) << 7 | uvY); + byte hideWithArmorAndUvY = (byte)(Convert.ToByte(part.ArmorMaskFlags.ToValue()) << 7 | uvY); writer.Write(mirrorAndUvX); writer.Write(hideWithArmorAndUvY); writer.Write(part.Scale);