use most recent score object to transfer time in milliseconds
This commit is contained in:
parent
01df4f350e
commit
a085eaff6d
4
NS.py
4
NS.py
|
@ -477,7 +477,7 @@ class NS(Game, Animation):
|
|||
elif self.boss.player_defeated:
|
||||
status = "lost"
|
||||
else:
|
||||
status = f"complete {boss.time_elapse}"
|
||||
status = f"complete {self.most_recent_score.milliseconds}"
|
||||
|
||||
# Connect and send status message to each peer. If sending fails, pass and wait until the next iteration.
|
||||
for peer in self.peers.values():
|
||||
|
@ -504,7 +504,7 @@ class NS(Game, Animation):
|
|||
message = incoming[0].recv(64).decode()
|
||||
if message.startswith("complete"):
|
||||
try:
|
||||
peer.result = float(message.split()[-1])
|
||||
peer.result = int(message.split()[-1])
|
||||
peer.status = "complete"
|
||||
except:
|
||||
# Improperly formatted message received
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
40143 0
|
Loading…
Reference in New Issue