From 0942dc5f60183d5ea200976f76b8e37eb8911b31 Mon Sep 17 00:00:00 2001 From: Et0h Date: Wed, 3 Dec 2014 02:02:53 +0000 Subject: [PATCH] Fix FASTFORWARD_BEHIND_THRESHOLD implementation --- syncplay/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/client.py b/syncplay/client.py index b8753b4..5fafbc6 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -256,12 +256,12 @@ class SyncplayClient(object): if diff > self._config['rewindThreshold'] and not doSeek and not self._config['rewindOnDesync'] == False: madeChangeOnPlayer = self._rewindPlayerDueToTimeDifference(position, setBy) if self._config['fastforwardOnDesync'] and (self.userlist.currentUser.canControl() == False or self._config['dontSlowDownWithMe'] == True): - if diff < constants.FASTFORWARD_BEHIND_THRESHOLD and not doSeek: + if diff < (constants.FASTFORWARD_BEHIND_THRESHOLD * -1) and not doSeek: if self.behindFirstDetected is None: self.behindFirstDetected = time.time() else: durationBehind = time.time() - self.behindFirstDetected - if (durationBehind > self._config['fastforwardThreshold']) and (diff < (self._config['fastforwardThreshold'] * -1)): + if (durationBehind > (self._config['fastforwardThreshold']-constants.FASTFORWARD_BEHIND_THRESHOLD)) and (diff < (self._config['fastforwardThreshold'] * -1)): madeChangeOnPlayer = self._fastforwardPlayerDueToTimeDifference(position, setBy) self.behindFirstDetected = time.time() + constants.FASTFORWARD_RESET_THRESHOLD else: