Skip to content

Commit 7b64992

Browse files
committed
timer shortening
1 parent 7d0db17 commit 7b64992

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Shared/PlasmaShared/GlobalConst.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ static void SetMode(ModeType newMode)
209209
public const int MinNetKarmaToVote = -30;
210210
public const int PostVoteHideThreshold = -6;
211211
public const bool OnlyAdminsSeePostVoters = false;
212-
public const int PlanetWarsMinutesToAttackIfNoOption = 2;
213-
public const int PlanetWarsMinutesToAttack = 5;
214-
public const int PlanetWarsMinutesToAccept = 10;
212+
public const int PlanetWarsMinutesToAttackIfNoOption = 1;
213+
public const int PlanetWarsMinutesToAttack = 1;
214+
public const int PlanetWarsMinutesToAccept = 2;
215215
public const int PlanetWarsDropshipsStayForMinutes = 2*60;
216216
public const int PlanetWarsMaxTeamsize = 4;
217217
public const double PlanetWarsDefenderWinKillCcMultiplier = 0.2;

ZkLobbyServer/SpringieInterface/PlanetWarsMatchMaker.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public PlanetWarsMatchMaker(ZkLobbyServer.ZkLobbyServer server)
6666
DefenderVotes = dbState.DefenderVotes ?? new Dictionary<int, List<string>>();
6767
AttackerSideChangeTime = dbState.AttackerSideChangeTime;
6868
RunningBattles = dbState.RunningBattles ?? new Dictionary<int, AttackOption>();
69+
70+
// sanity: if PhaseStartTime is in the future or too old, reset to now
71+
if (PhaseStartTime > DateTime.UtcNow || PhaseStartTime < DateTime.UtcNow.AddHours(-1))
72+
PhaseStartTime = DateTime.UtcNow;
6973
}
7074
else
7175
{

0 commit comments

Comments
 (0)