Prevent docked dup eon distance from start

This commit is contained in:
AnthorNet 2017-12-28 11:00:59 +01:00 committed by GitHub
parent 1443e45272
commit 6d670a27ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,10 @@ class DuplicateMessages(Thread):
message['message']['StarPos'][1] = round(message['message']['StarPos'][1] *32)
if message['message']['StarPos'][2]:
message['message']['StarPos'][2] = round(message['message']['StarPos'][2] *32)
# Prevent Docked event with small difference in distance from start
if message['message']['DistFromStarLS']:
message['message']['DistFromStarLS'] = int(message['message']['DistFromStarLS'])
message = simplejson.dumps(message, sort_keys=True) # Ensure most duplicate messages will get the same key
key = hashlib.sha256(message).hexdigest()