public static bool GameTick_Prefix(FactoryProductionStat __instance)
        {
            //Do not run in single player for host
            if (!SimulatedWorld.Initialized || LocalPlayer.IsMasterClient)
            {
                return(true);
            }

            //Multiplayer clients should not include their own calculated statistics
            if (!StatisticsManager.IsIncomingRequest)
            {
                __instance.ClearRegisters();
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        public static bool GameTick_Prefix(FactoryProductionStat __instance)
        {
            //Do not run in single player for host
            if (!Multiplayer.IsActive || Multiplayer.Session.LocalPlayer.IsHost)
            {
                return(true);
            }

            //Multiplayer clients should not include their own calculated statistics
            if (!Multiplayer.Session.Statistics.IsIncomingRequest)
            {
                __instance.ClearRegisters();
                return(false);
            }

            return(true);
        }