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,26 @@
using System.Reflection;
using NitroxClient.Communication.Abstract;
using NitroxClient.GameLogic;
using NitroxModel.Helper;
using NitroxModel.Packets;
using NitroxModel_Subnautica.DataStructures;
using UnityEngine;
namespace NitroxPatcher.Patches.Dynamic;
public sealed partial class StasisSphere_Shoot_Patch : NitroxPatch, IDynamicPatch
{
private static readonly MethodInfo TARGET_METHOD = Reflect.Method((StasisSphere t) => t.Shoot(default, default, default, default, default));
private static ushort? LocalPlayerId => Resolve<LocalPlayer>().PlayerId;
public static void Prefix(StasisSphere __instance, Vector3 position, Quaternion rotation, float speed, float lifeTime, float chargeNormalized)
{
if (__instance.GetComponent<BulletManager.RemotePlayerBullet>() || !LocalPlayerId.HasValue)
{
return;
}
Resolve<IPacketSender>().Send(new StasisSphereShot(LocalPlayerId.Value, position.ToDto(), rotation.ToDto(), speed, lifeTime, chargeNormalized));
}
}