diff --git a/cs2rtv/cs2rtv.cs b/cs2rtv/cs2rtv.cs index 1c6717b..94a3c6e 100644 --- a/cs2rtv/cs2rtv.cs +++ b/cs2rtv/cs2rtv.cs @@ -70,7 +70,7 @@ public override void Load(bool hotReload) { if(!hotReload && !firstmaprandom) { - if(!Server.MapName.Contains("de")) + if(!Server.MapName.Contains("de_")) { Server.NextFrame(()=> { @@ -286,13 +286,11 @@ public void StartRtv() { isrtv = true; isforcertv = true; - string? randommap = null; - while (randommap == null) - { - int index = random.Next(0, maplist.Count - 1); - if (mapcooldown.Find(x => Regex.IsMatch(maplist[index], x)) != null) continue; - else randommap = maplist[index]; - } + var randommap = ""; + int index = random.Next(0, maplist.Count - 1); + if (mapcooldown.Find(x => Regex.IsMatch(maplist[index], x)) == null) + randommap = maplist[index]; + rtvwin = true; Logger.LogInformation("空服换图"); VoteEnd(randommap);