Skip to content

Commit

Permalink
Tie Human Reselect Spawn Setting to BetterSpawns
Browse files Browse the repository at this point in the history
- When BetterSpawns_Humans_SetReselectSpawns is false then it skips the method to find a random barracks location
  • Loading branch information
data-bomb committed Jun 15, 2024
1 parent fdec412 commit 86d7deb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Si_BetterSpawns/Si_BetterSpawns.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 System.Collections.Generic;

[assembly: MelonInfo(typeof(BetterSpawns), "Better Spawns", "0.9.7", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonInfo(typeof(BetterSpawns), "Better Spawns", "0.9.8", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonGame("Bohemia Interactive", "Silica")]
[assembly: MelonOptionalDependencies("Admin Mod")]

Expand Down Expand Up @@ -112,6 +112,12 @@ public static bool Prefix(ref SpawnPoint __result, Team __0)
// for human teams
if (__0.Index == 1 || __0.Index == 2)
{
// check if we're supposed to make a change or allow default game code to run
if (!Pref_BetterSpawns_Human_ReselectSpawn_Enabled.Value)
{
return true;
}

SpawnPoint? spawnPointRandomBarracks = FindRandomHumanBarracksSpawn(__0);
if (spawnPointRandomBarracks == null)
{
Expand Down

0 comments on commit 86d7deb

Please sign in to comment.