initial commit
This commit is contained in:
commit
d701598350
67 changed files with 9351 additions and 0 deletions
18
Outnumbered/Engine/Rules.cs
Normal file
18
Outnumbered/Engine/Rules.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue