Skip to content

Commit

Permalink
Fixed CM showing time instead of laps (#90)
Browse files Browse the repository at this point in the history
* Fixed CM showing time instead of laps

* Removed unused import
  • Loading branch information
thisguyStan authored Mar 16, 2024
1 parent 23c22fc commit 758912e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AssettoServer/Network/Http/HttpController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public InfoResponse GetInfo()
Session = _sessionManager.CurrentSession.Configuration.Id,
Port = _configuration.Server.UdpPort,
SessionTypes = _cache.SessionTypes,
Timed = _configuration.Sessions.Any(s => s.IsTimedRace),
Timed = _configuration.Sessions.All(s => s.IsTimedRace),
TimeLeft = _sessionManager.CurrentSession.TimeLeftMilliseconds / 1000,
TimeOfDay = (int)WeatherUtils.SunAngleFromTicks(_weatherManager.CurrentDateTime.TimeOfDay.TickOfDay),
Timestamp = 0,
Expand Down Expand Up @@ -139,7 +139,7 @@ public async Task<DetailResponse> GetDetails(string? guid)
Session = _sessionManager.CurrentSession.Configuration.Id,
Port = _configuration.Server.UdpPort,
SessionTypes = _cache.SessionTypes,
Timed = _configuration.Sessions.Any(s => s.IsTimedRace),
Timed = _configuration.Sessions.All(s => s.IsTimedRace),
TimeLeft = _sessionManager.CurrentSession.TimeLeftMilliseconds / 1000,
TimeOfDay = (int)WeatherUtils.SunAngleFromTicks(_weatherManager.CurrentDateTime.TimeOfDay.TickOfDay),
Timestamp = 0,
Expand Down
2 changes: 1 addition & 1 deletion AssettoServer/Server/KunosLobbyRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private async Task RegisterToLobbyAsync(CancellationToken token)
queryParams["stability"] = cfg.StabilityAllowed ? "1" : "0";
queryParams["legal_tyres"] = cfg.LegalTyres;
queryParams["fixed_setup"] = _configuration.EntryList.Cars.Any(c => c.FixedSetup != null) ? "1" : "0";
queryParams["timed"] = _configuration.Sessions.Any(s => s.IsTimedRace) ? "1" : "0";
queryParams["timed"] = _configuration.Sessions.All(s => s.IsTimedRace) ? "1" : "0";
queryParams["extra"] = cfg.HasExtraLap ? "1" : "0";
queryParams["pit"] = cfg.PitWindowEnd > 0 ? "1" : "0";
queryParams["inverted"] = cfg.InvertedGridPositions.ToString();
Expand Down

0 comments on commit 758912e

Please sign in to comment.