Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CommunityBugFixCollection/Locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"CommunityBugFixCollection.SmoothDraggables.Description": "Umgeht, dass Slider und Joints in Headless-Sessions verrutschen.",
"CommunityBugFixCollection.TiltedUIAlignment.Description": "Kippt die UI-fokussierte Kamera, um UIX-Renderprobleme zum umgehen.",
"CommunityBugFixCollection.StationaryGrabWorldActivation.Description": "Verhindert, dass die Welt-Greifen Fortbewegung den Spieler bei jeder Aktivierung bewegt.",
"CommunityBugFixCollection.ValidQuaternionInputs.Description": "Lässt das ProtoFlux-Tool valide float und double Quaternions spawnen.",
"CommunityBugFixCollection.UserInspectorAsNonHost.Description": "Sorgt dafür, dass Benutzer-Inspektoren bereits präsente Benutzer auch in Sessions anzeigen, in denen man nicht der Host ist."
}
}
1 change: 1 addition & 0 deletions CommunityBugFixCollection/Locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"CommunityBugFixCollection.StationaryGrabWorldActivation.Description": "Stops the Grab World Locomotion from moving the player with each activiation.",
"CommunityBugFixCollection.TiltedUIAlignment.Description": "Tilts the UI-Focus camera to work around UIX rendering issues.",
"CommunityBugFixCollection.UserInspectorAsNonHost.Description": "Fixes UserInspectors not listing existing users in the session for non-host users.",
"CommunityBugFixCollection.ValidQuaternionInputs.Description": "Makes the ProtoFlux Tool spawn valid float and double quaternion inputs.",
"CommunityBugFixCollection.ValueModDecimal.Description": "Adds a zero check to the Decimal ValueMod ProtoFlux node to prevent DIV/0 crashes"
}
}
41 changes: 41 additions & 0 deletions CommunityBugFixCollection/ValidQuaternionInputs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Elements.Core;
using FrooxEngine.ProtoFlux;
using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes;
using HarmonyLib;
using MonkeyLoader;
using MonkeyLoader.Resonite;
using System;
using System.Collections.Generic;
using System.Text;

namespace CommunityBugFixCollection
{
[HarmonyPatchCategory(nameof(ValidQuaternionInputs))]
[HarmonyPatch(typeof(ProtoFluxTool), nameof(ProtoFluxTool.SpawnNode), [typeof(Type), typeof(Action<ProtoFluxNode>)])]
internal sealed class ValidQuaternionInputs : ResoniteMonkey<ValidQuaternionInputs>
{
public override IEnumerable<string> Authors => Contributors.Banane9;

public override bool CanBeDisabled => true;

private static void Postfix(ProtoFluxNode __result)
{
if (!Enabled)
return;

Logger.Info(() => $"__result is: {__result.GetType().CompactDescription()}");

__result.RunInUpdates(0, () =>
{
if (__result is ValueInput<floatQ> floatQInput)
{
floatQInput.Value.Value = floatQ.Identity;
return;
}

if (__result is ValueInput<doubleQ> doubleQInput)
doubleQInput.Value.Value = doubleQ.Identity;
});
}
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ just disable them in the settings in the meantime.

* Sliders and Joints snapping in sessions hosted by a headless (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/399)
* Missing Cloud Home template for Groups (fallback to User Cloud Home) (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1144)
* ProtoFlux inputs for float and double quaternions being spawned with invalid values
* https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1158
* https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2979
* UIX Rendering issues in UI-Focus mode (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1292)


Expand Down