Skip to content

Commit

Permalink
fix(input): allow turn with hoverpack (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenira authored Feb 4, 2024
1 parent 3f773bd commit 9e3e8fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugin/src/input/InputPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static bool handleAxisInput(ref Vector2 __result, int xAxisActionId, int
[HarmonyPatch(typeof(PlayerFirstPersonController), nameof(PlayerFirstPersonController.Move))]
static void Move(PlayerFirstPersonController __instance)
{
if (!__instance.m_IsGrounded || InputHandler.instance.playerInputBlocked || InputHandler.instance.playerInputBlockedOverride && VRCameraManager.mainCamera != null)
if ((!__instance.m_IsGrounded && !__instance.hoverPackActive) || InputHandler.instance.playerInputBlocked || InputHandler.instance.playerInputBlockedOverride && VRCameraManager.mainCamera != null)
{
return;
}
Expand Down
11 changes: 6 additions & 5 deletions plugin/src/util/Logger.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using UnityEngine;

namespace TechtonicaVR.Util;

Expand All @@ -22,22 +23,22 @@ public static PluginLogger GetLogger<T>()

public void LogInfo(string message)
{
TechtonicaVR.Logger.LogInfo($"[{prefix}] {message}");
TechtonicaVR.Logger.LogInfo($"[{prefix}] ({Time.frameCount}) {message}");
}

public void LogDebug(string message)
{
TechtonicaVR.Logger.LogDebug($"[{prefix}] {message}");
TechtonicaVR.Logger.LogDebug($"[{prefix}] ({Time.frameCount}) {message}");
}

public void LogWarning(string message)
{
TechtonicaVR.Logger.LogWarning($"[{prefix}] {message}");
TechtonicaVR.Logger.LogWarning($"[{prefix}] ({Time.frameCount}) {message}");
}

public void LogError(string message)
{
TechtonicaVR.Logger.LogError($"[{prefix}] {message}");
TechtonicaVR.Logger.LogError($"[{prefix}] ({Time.frameCount}) {message}");
}

internal void LogTrace(string v)
Expand All @@ -46,6 +47,6 @@ internal void LogTrace(string v)
{
return;
}
TechtonicaVR.Logger.LogDebug($"[{prefix}] {v}");
TechtonicaVR.Logger.LogDebug($"[{prefix}] ({Time.frameCount}) {v}");
}
}

0 comments on commit 9e3e8fd

Please sign in to comment.