first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using System.Reflection;
using NitroxClient.MonoBehaviours.Vehicles;
using NitroxModel.Helper;
using UnityEngine;
namespace NitroxPatcher.Patches.Dynamic;
/// <summary>
/// Gives the real velocity data for <see cref="FootstepSounds"/> to play the right step sounds.
/// </summary>
public sealed partial class Exosuit_GetVelocity_Patch : NitroxPatch, IDynamicPatch
{
private static readonly MethodInfo targetMethod = Reflect.Method((Exosuit t) => ((IGroundMoveable)t).GetVelocity());
public static bool Prefix(Exosuit __instance, ref Vector3 __result)
{
if (__instance.TryGetComponent(out ExosuitMovementReplicator exosuitMovementReplicator))
{
__result = exosuitMovementReplicator.velocity;
return false;
}
return true;
}
}