acl track skipping workaround

This commit is contained in:
Asval
2023-11-09 20:34:58 +01:00
parent 88adcd03be
commit b525796f79
5 changed files with 11 additions and 11 deletions

View File

@@ -176,7 +176,7 @@ public class FModelApiEndpoint : AbstractApiProvider
{
if (AutoUpdater.DownloadUpdate(args))
{
UserSettings.Default.ShowChangelog = true;
UserSettings.Default.ShowChangelog = !qa.Value;
UserSettings.Default.CommitHash = qa.CommitHash;
Application.Current.Shutdown();
}

View File

@@ -201,7 +201,7 @@ public class Skeleton : IDisposable
sequence.Tracks[bone.SkeletonIndex].GetBoneTransform(f, sequence.NumFrames, ref boneOrientation, ref bonePosition, ref boneScale);
if (!bone.IsRoot) boneMatrix = _boneMatriceAtFrame[bone.ParentIndex];
bonePosition = rotationOnly ? bone.Rest.Position : bonePosition * Constants.SCALE_DOWN_RATIO;
bonePosition = rotationOnly || bonePosition.IsZero() ? bone.Rest.Position : bonePosition * Constants.SCALE_DOWN_RATIO;
boneMatrix = new Transform
{

View File

@@ -16,11 +16,11 @@ public class Section
public Section(int index, int facesCount, int firstFaceIndex)
{
MaterialIndex = index;
MaterialIndex = Math.Max(0, index);
FacesCount = facesCount;
FirstFaceIndex = firstFaceIndex;
FirstFaceIndexPtr = new IntPtr(FirstFaceIndex * sizeof(uint));
Color = Constants.COLOR_PALETTE[index % Constants.PALETTE_LENGTH];
Color = Constants.COLOR_PALETTE[MaterialIndex % Constants.PALETTE_LENGTH];
Show = true;
}

View File

@@ -329,12 +329,12 @@ public class Material : IDisposable
switch (SelectedTexture)
{
case 0:
case 0 when DiffuseColor.Length > 0:
SnimGui.Layout("Color");ImGui.PushID(3);
ImGui.ColorEdit4("", ref DiffuseColor[SelectedChannel], ImGuiColorEditFlags.NoAlpha);
ImGui.PopID();
break;
case 4:
case 4 when EmissiveColor.Length > 0:
SnimGui.Layout("Color");ImGui.PushID(3);
ImGui.ColorEdit4("", ref EmissiveColor[SelectedChannel], ImGuiColorEditFlags.NoAlpha);
ImGui.PopID();SnimGui.Layout("Region");ImGui.PushID(4);
@@ -357,11 +357,11 @@ public class Material : IDisposable
{
return SelectedTexture switch
{
0 => Diffuse[SelectedChannel],
1 => Normals[SelectedChannel],
2 => SpecularMasks[SelectedChannel],
0 when Diffuse.Length > 0 => Diffuse[SelectedChannel],
1 when Normals.Length > 0 => Normals[SelectedChannel],
2 when SpecularMasks.Length > 0 => SpecularMasks[SelectedChannel],
3 => Ao.Texture,
4 => Emissive[SelectedChannel],
4 when Emissive.Length > 0 => Emissive[SelectedChannel],
_ => null
};
}