public static bool AddPrebuildModel_Prefix(GPUInstancingManager __instance, ref int __result) { //Do not add model to the GPU queue if player is not on the same planet as building that was build if (SimulatedWorld.Initialized && FactoryManager.EventFactory != null && FactoryManager.EventFactory.planet != __instance.activePlanet) { __result = 0; return(false); } return(true); }
public static bool AddPrebuildModel_Prefix(GPUInstancingManager __instance, ref int __result) { //Do not add model to the GPU queue if player is not on the same planet as building that was build if (Multiplayer.IsActive && Multiplayer.Session.Factories.EventFactory != null && Multiplayer.Session.Factories.EventFactory.planet != GameMain.localPlanet) { __result = 0; return(false); } return(true); }
public static bool get_activePlanet_Prefix(GPUInstancingManager __instance, ref PlanetData __result) { __result = (__instance.specifyPlanet != null) ? __instance.specifyPlanet : GameMain.localPlanet; if (__result == null && GameMain.localStar != null) { foreach (PlanetData p in GameMain.galaxy.StarById(GameMain.localStar.id).planets) { if (p.factoryLoading) { __result = p; break; } } } return(false); }