Skip to content

Commit

Permalink
Stop Disjointed End of Game Conditions
Browse files Browse the repository at this point in the history
- Mod intended to prevent a loss when an HQ was under construction
- Mod did this correctly, BUT the game clients were also doing the same loss calculation (independent of the server), leading to some comically bad scenarios where music keeps playing endlessly and the game gets stuck because the server doesn't want the round to end but the clients do
- Workaround for #40 is to temporarily remove this functionality from the mods until a better solution is found
  • Loading branch information
data-bomb committed May 9, 2024
1 parent ed6de9f commit b908926
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Si_HQlessHumansLose/Si_HQlessHumansLose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You should have received a copy of the GNU General Public License
using System;
using SilicaAdminMod;

[assembly: MelonInfo(typeof(HQlessHumansLose), "HQless Humans Lose", "1.3.3", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonInfo(typeof(HQlessHumansLose), "HQless Humans Lose", "1.3.4", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonGame("Bohemia Interactive", "Silica")]
[assembly: MelonOptionalDependencies("Admin Mod")]

Expand Down Expand Up @@ -257,6 +257,8 @@ private static void Postfix(ConstructionSite __instance, bool __0)
}

// don't let the structure count reach 0 if HQ/Nest is under construction
// disabled for now because the game clients independently calculate the end of game conditions (not just the server) :(
#if false
#if NET6_0
[HarmonyPatch(typeof(Team), nameof(Team.UpdateMajorStructuresCount))]
#else
Expand Down Expand Up @@ -360,7 +362,7 @@ public static void Postfix(Team __instance, ref bool __result)
}
}
}

#endif

#if NET6_0
[HarmonyPatch(typeof(ConstructionSite), nameof(ConstructionSite.Update))]
Expand Down

0 comments on commit b908926

Please sign in to comment.