From 6583e49b0a43a0f37e2ae5b8d6abd64886668cf5 Mon Sep 17 00:00:00 2001 From: joshtch Date: Mon, 19 Dec 2016 14:29:01 -0500 Subject: [PATCH] Minor adjustments --- cloud.py | 2 ++ device.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud.py b/cloud.py index 3484640..bb0ae42 100644 --- a/cloud.py +++ b/cloud.py @@ -23,6 +23,8 @@ def step(self): and self.requestList.next().isReady(self.time) \ and len(responsePackets) <= MAX_PACKETS_PER_STEP: headPacket = self.requestList.pop() + if headPacket.arriveTime() < self.time: + headPacket.addLatency(self.time - headPacket.arriveTime()) for i in xrange(1, self.num_players + 1): newPacket = headPacket.deepcopy() newPacket.sender = 0 diff --git a/device.py b/device.py index 99e5c21..8247826 100644 --- a/device.py +++ b/device.py @@ -2,7 +2,7 @@ from random import randint from data import Data -TICKS_PER_EVENT = 500 +TICKS_PER_EVENT = 60 class Device(object): cloud_id = 0