SRMP-Public/SRMP/Patches/Patch_SlimeEatAsh.cs
2023-05-29 22:23:11 +02:00

25 lines
No EOL
640 B
C#

using HarmonyLib;
using SRMultiplayer.Networking;
using SRMultiplayer.Packets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace SRMultiplayer.Patches
{
[HarmonyPatch(typeof(SlimeEatAsh))]
[HarmonyPatch("Update")]
class SlimeEatAsh_Update
{
static bool Prefix(SlimeEatAsh __instance)
{
if (!Globals.IsMultiplayer || Globals.HandlePacket) return true;
var netActor = __instance.GetComponent<NetworkActor>();
return (netActor != null && netActor.IsLocal) ;
}
}
}