public static bool Prefix(out float?__state, LiveMixin __instance)
        {
            __state = null;

            LiveMixinManager liveMixinManager = NitroxServiceLocator.LocateService <LiveMixinManager>();

            if (!liveMixinManager.IsWhitelistedUpdateType(__instance))
            {
                return(true); // everyone should process this locally
            }

            // Persist the previous health value
            __state = __instance.health;

            return(liveMixinManager.ShouldApplyNextHealthUpdate(__instance));
        }
Beispiel #2
0
 public LifeMixinChangedProcessor(IPacketSender packetSender, LiveMixinManager liveMixinManager)
 {
     this.packetSender     = packetSender;
     this.liveMixinManager = liveMixinManager;
 }