cs2-outnumbered/Outnumbered/Engine/Rules.cs
Kamal Tufekcic d701598350
All checks were successful
CI / build (push) Successful in 32s
CI / release (push) Successful in 32s
CI / lint (push) Successful in 30s
initial commit
2026-07-05 13:28:35 +03:00

18 lines
620 B
C#

using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
namespace Outnumbered.Engine;
// Game-rules access. mp_roundtime caps at 60 min so the round timer would expire and hang; the map ends only on the kill
// goal, so we override the round duration directly on the rules each round.
internal static class Rules
{
public static CCSGameRules? Current =>
Utilities.FindAllEntitiesByDesignerName<CCSGameRulesProxy>(EngineNames.GameRulesDesigner).FirstOrDefault()?.GameRules;
public static void MakeRoundEndless()
{
var gr = Current;
gr?.RoundTime = 999999; // ~277h
}
}