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 @@ -28,6 +28,7 @@
"CommunityBugFixCollection.NonHDRColorClamping.Description": "Korrigiert, dass die nicht-HDR Varianten der Color(X) Kanal-Additionen die Werte nicht limitieren.",
"CommunityBugFixCollection.PauseAnimatorUpdates.Description": "Verhindert, dass Animatoren jeden Frame in alle assoziierten Felder schreiben, obwohl sie nicht am animieren sind.",
"CommunityBugFixCollection.SmoothDraggables.Description": "Umgeht, dass Slider und Joints in Headless-Sessions verrutschen.",
"CommunityBugFixCollection.StationaryGrabWorldActivation.Description": "Verhindert, dass die Welt-Greifen Fortbewegung den Spieler bei jeder Aktivierung bewegt.",
"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 @@ -28,6 +28,7 @@
"CommunityBugFixCollection.NonHDRColorClamping.Description": "Fixes non-HDR variants of Color(X) channel addition not clamping.",
"CommunityBugFixCollection.PauseAnimatorUpdates.Description": "Fixes animators updating all associated fields every frame while enabled but not playing.",
"CommunityBugFixCollection.SmoothDraggables.Description": "Workaround for Sliders and Joints snapping in sessions hosted by a headless.",
"CommunityBugFixCollection.StationaryGrabWorldActivation.Description": "Stops the Grab World Locomotion from moving the player with each activiation.",
"CommunityBugFixCollection.UserInspectorAsNonHost.Description": "Fixes UserInspectors not listing existing users in the session for non-host users."
}
}
35 changes: 35 additions & 0 deletions CommunityBugFixCollection/StationaryGrabWorldActivation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using FrooxEngine;
using HarmonyLib;
using MonkeyLoader.Resonite;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

// Originally released under MIT-0 here:
// https://github.com/art0007i/FixGrabWorld

namespace CommunityBugFixCollection
{
[HarmonyPatchCategory(nameof(StationaryGrabWorldActivation))]
[HarmonyPatch(typeof(GrabWorldLocomotion), nameof(GrabWorldLocomotion.TryActivate))]
internal sealed class StationaryGrabWorldActivation : ResoniteMonkey<StationaryGrabWorldActivation>
{
public override IEnumerable<string> Authors => Contributors.Art0007i;

public override bool CanBeDisabled => true;

private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codes)
{
var directionReferenceGetter = AccessTools.PropertyGetter(typeof(ILocomotionReference), nameof(ILocomotionReference.DirectionReference));

foreach (var code in codes)
{
if (Enabled && code.Calls(directionReferenceGetter))
code.operand = AccessTools.PropertyGetter(typeof(ILocomotionReference), nameof(ILocomotionReference.GripReference));

yield return code;
}
}
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The issues fixed by this mod will be linked in the following list.
If any of them have been closed and not removed from the mod,
just disable them in the settings in the meantime.

* Grab World Locomotion moving the user forward a little every time it's activated (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/86)
* Duplicating Components breaking drives (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/92)
* Pressing Duplicate on the Component in an Inspector
* Using the Component Clone Tool to duplicate them onto a slot
Expand Down