allow tracking of "zombie" clients to support stat tracking in zm

This commit is contained in:
RaidMax 2020-08-31 12:13:20 -05:00
parent bc7dc3a71a
commit cce6482541
2 changed files with 3 additions and 1 deletions

View File

@ -785,7 +785,7 @@ namespace IW4MAdmin
var polledClients = await PollPlayersAsync(); var polledClients = await PollPlayersAsync();
foreach (var disconnectingClient in polledClients[1]) foreach (var disconnectingClient in polledClients[1].Where(_client => !_client.IsZombieClient /* ignores "fake" zombie clients */))
{ {
disconnectingClient.CurrentServer = this; disconnectingClient.CurrentServer = this;
var e = new GameEvent() var e = new GameEvent()

View File

@ -657,6 +657,8 @@ namespace SharedLibraryCore.Database.Models
[NotMapped] [NotMapped]
public bool IsBot => NetworkId == Name.GenerateGuidFromString(); public bool IsBot => NetworkId == Name.GenerateGuidFromString();
[NotMapped] [NotMapped]
public bool IsZombieClient => IsBot && Name == "Zombie";
[NotMapped]
public string XuidString => (NetworkId + 0x110000100000000).ToString("x"); public string XuidString => (NetworkId + 0x110000100000000).ToString("x");
[NotMapped] [NotMapped]
public string GuidString => NetworkId.ToString("x"); public string GuidString => NetworkId.ToString("x");