diff --git a/master_server/openttd/receive.py b/master_server/openttd/receive.py index 6828b78..ce3702c 100644 --- a/master_server/openttd/receive.py +++ b/master_server/openttd/receive.py @@ -122,6 +122,7 @@ def receive_PACKET_UDP_SERVER_RESPONSE(source, data): "map_height", "map_type", "is_dedicated", + "ticks_playing", ] } @@ -163,6 +164,8 @@ def receive_PACKET_UDP_SERVER_RESPONSE(source, data): payload["map_type"], data = read_uint8(data) payload["is_dedicated"], data = read_uint8(data) + payload["ticks_playing"] = max(0, (payload["game_date"] - payload["start_date"]) * 74) + if len(data) != 0: raise PacketInvalidData("more bytes than expected")