diff --git a/Application/EventParsers/BaseEventParser.cs b/Application/EventParsers/BaseEventParser.cs index 28b975451..9c2e9b97a 100644 --- a/Application/EventParsers/BaseEventParser.cs +++ b/Application/EventParsers/BaseEventParser.cs @@ -359,7 +359,7 @@ namespace IW4MAdmin.Application.EventParsers State = EFClient.ClientState.Connected, }, Extra = team, - RequiredEntity = GameEvent.EventRequiredEntity.None, + RequiredEntity = GameEvent.EventRequiredEntity.Origin, GameTime = gameTime, Source = GameEvent.EventSource.Log }; diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index 7ed4596be..8bb8b27e1 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -96,6 +96,7 @@ namespace IW4MAdmin client.ClientNumber = clientFromLog.ClientNumber; client.Score = clientFromLog.Score; client.Ping = clientFromLog.Ping; + client.Team = clientFromLog.Team; client.CurrentServer = this; client.State = ClientState.Connecting; diff --git a/WebfrontCore/Controllers/ServerController.cs b/WebfrontCore/Controllers/ServerController.cs index ce0789dd9..acb2085a4 100644 --- a/WebfrontCore/Controllers/ServerController.cs +++ b/WebfrontCore/Controllers/ServerController.cs @@ -101,7 +101,8 @@ namespace WebfrontCore.Controllers Deaths = clientData.stats?.MatchData?.Deaths, ScorePerMinute = clientData.stats?.SessionSPM, Kdr = clientData.stats?.MatchData?.Kdr, - ZScore = clientData.stats?.ZScore + ZScore = clientData.stats?.ZScore, + Team = clientData.client.Team }) .ToList() }).ToList(); diff --git a/WebfrontCore/ViewModels/ScoreboardInfo.cs b/WebfrontCore/ViewModels/ScoreboardInfo.cs index a9ac140a1..1e5d3570e 100644 --- a/WebfrontCore/ViewModels/ScoreboardInfo.cs +++ b/WebfrontCore/ViewModels/ScoreboardInfo.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using SharedLibraryCore.Database.Models; namespace WebfrontCore.ViewModels { @@ -24,5 +25,6 @@ namespace WebfrontCore.ViewModels public double? ScorePerMinute { get; set; } public double? Kdr { get; set; } public double? ZScore { get; set; } + public EFClient.TeamType Team { get; set; } } } diff --git a/WebfrontCore/Views/Server/_Scoreboard.cshtml b/WebfrontCore/Views/Server/_Scoreboard.cshtml index 51d498348..fbc539833 100644 --- a/WebfrontCore/Views/Server/_Scoreboard.cshtml +++ b/WebfrontCore/Views/Server/_Scoreboard.cshtml @@ -38,7 +38,7 @@ @foreach (var client in Model.ShouldOrderDescending ? Model.ClientInfo.OrderByDescending(OrderByFunc) : Model.ClientInfo.OrderBy(OrderByFunc)) { - + diff --git a/WebfrontCore/wwwroot/css/src/main.scss b/WebfrontCore/wwwroot/css/src/main.scss index c89c1cc2a..d28287827 100644 --- a/WebfrontCore/wwwroot/css/src/main.scss +++ b/WebfrontCore/wwwroot/css/src/main.scss @@ -455,3 +455,11 @@ div.card { padding-right: 1rem !important; line-height: 1.45rem !important; } + +.team-allies-bg { + background-color: rgba(0, 0, 139, 0.1); +} + +.team-axis-bg { + background-color: rgba(139, 0, 0, 0.1); +}