diff --git a/RetakesPlugin/RetakesPlugin.cs b/RetakesPlugin/RetakesPlugin.cs index f7466fa..6748d48 100644 --- a/RetakesPlugin/RetakesPlugin.cs +++ b/RetakesPlugin/RetakesPlugin.cs @@ -20,7 +20,7 @@ namespace RetakesPlugin; [MinimumApiVersion(220)] public class RetakesPlugin : BasePlugin { - private const string Version = "2.0.6"; + private const string Version = "2.0.7"; #region Plugin info public override string ModuleName => "Retakes Plugin"; @@ -510,7 +510,6 @@ public HookResult OnPlayerConnectFull(EventPlayerConnectFull @event, GameEventIn } // TODO: We can make use of sv_human_autojoin_team 3 to prevent needing to do this. - player.TeamNum = (int)CsTeam.Spectator; player.ForceTeamTime = 3600.0f; // Create a timer to do this as it would occasionally fire too early. @@ -521,6 +520,7 @@ public HookResult OnPlayerConnectFull(EventPlayerConnectFull @event, GameEventIn return; } + player.ChangeTeam(CsTeam.Spectator); player.ExecuteClientCommand("teammenu"); }); @@ -638,7 +638,6 @@ public HookResult OnRoundPostStart(EventRoundPoststart @event, GameEventInfo inf Helpers.Debug($"Game manager not loaded."); return HookResult.Continue; } - // If we are in warmup, skip. if (Helpers.GetGameRules().WarmupPeriod) {