Poprawka czasu gry
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using TownOfUsStatsExporter.Models;
|
||||
using TownOfUsStatsExporter.Patches;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TownOfUsStatsExporter.Export;
|
||||
@@ -72,13 +73,16 @@ public static class DataTransformer
|
||||
|
||||
private static GameInfoData BuildGameInfo()
|
||||
{
|
||||
// Get actual game duration (from intro end to game end) instead of total Time.time
|
||||
var gameDuration = GameStartTimePatch.GetGameDuration();
|
||||
|
||||
return new GameInfoData
|
||||
{
|
||||
GameId = Guid.NewGuid().ToString(),
|
||||
Timestamp = DateTime.UtcNow,
|
||||
LobbyCode = InnerNet.GameCode.IntToGameName(AmongUsClient.Instance.GameId),
|
||||
GameMode = GameOptionsManager.Instance?.CurrentGameOptions?.GameMode.ToString() ?? "Unknown",
|
||||
Duration = Time.time,
|
||||
Duration = gameDuration,
|
||||
Map = GetMapName((byte)(GameOptionsManager.Instance?.CurrentGameOptions?.MapId ?? 0)),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user