File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class DedicatedServer : IDisposable
22
22
public static EventHandler < SpringBattleContext > AnyDedicatedExited ;
23
23
24
24
private readonly SpringPaths paths ;
25
- private readonly Timer timer = new Timer ( 20000 ) ;
25
+ private readonly Timer timer = new Timer ( 1000 ) ;
26
26
27
27
private Dictionary < string , HashSet < byte > > gamePrivateMessages = new Dictionary < string , HashSet < byte > > ( ) ;
28
28
@@ -514,8 +514,7 @@ private void timer_Elapsed(object sender, ElapsedEventArgs e)
514
514
try
515
515
{
516
516
var timeSinceStart = DateTime . UtcNow . Subtract ( Context . StartTime ) . TotalSeconds ;
517
- const int timeToWait = 160 ; // force start after 180s
518
- const int timeToWarn = 100 ; // warn people after 120s
517
+ const int timeToWait = 160 ; // force start after this many seconds
519
518
520
519
if ( Context . IsHosting && IsRunning && ( Context . IngameStartTime == null ) )
521
520
{
@@ -524,7 +523,10 @@ private void timer_Elapsed(object sender, ElapsedEventArgs e)
524
523
Context . IsTimeoutForceStarted = true ;
525
524
ForceStart ( ) ;
526
525
}
527
- else if ( timeSinceStart > timeToWarn ) SayGame ( $ "Game will be force started in { Math . Max ( 20 , timeToWait - Math . Round ( timeSinceStart ) ) } seconds") ;
526
+ else
527
+ {
528
+ talker . SendText ( $ "/luarules pregame_timer_seconds { Convert . ToInt32 ( timeToWait - timeSinceStart ) } ") ;
529
+ }
528
530
}
529
531
}
530
532
catch ( Exception ex )
You can’t perform that action at this time.
0 commit comments