0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/Aki.Custom/Patches/ClampRagdollPatch.cs
chomp 83ca08ac87 381 > 390 (!108)
Co-authored-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com>
Co-authored-by: Dev <dev@dev.sp-tarkov.com>
Reviewed-on: SPT-AKI/Modules#108
2024-04-15 10:36:40 +00:00

23 lines
535 B
C#

using Aki.Reflection.Patching;
using EFT.Interactive;
using HarmonyLib;
using System.Reflection;
using UnityEngine;
namespace Aki.Custom.Patches
{
public class ClampRagdollPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(Corpse), nameof(Corpse.method_16));
}
[PatchPrefix]
private static void PatchPreFix(ref Vector3 velocity)
{
velocity.y = Mathf.Clamp(velocity.y, -2f, 2f);
}
}
}