18 lines
620 B
C#
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
|
|
}
|
|
}
|