Fix loop condition when > 1h
This commit is contained in:
parent
db16887c91
commit
6c6c4dd397
1 changed files with 3 additions and 2 deletions
|
@ -403,7 +403,7 @@ class Condition(object):
|
|||
if not story.lastMsgFinishTime:
|
||||
return False
|
||||
|
||||
loopTime = story.hugvey.command.timer.getElapsed()
|
||||
loopTime = story.hugvey.command.timer.getElapsed() % 3600
|
||||
givenTime = int(self.vars['time'])
|
||||
|
||||
if 'inverseMatch' in self.vars and self.vars['inverseMatch']:
|
||||
|
@ -950,7 +950,8 @@ class Diversion(object):
|
|||
window_open_second = float(self.params['start_second'])
|
||||
window_close_second = window_open_second + float(self.params['window'])
|
||||
|
||||
now = story.hugvey.command.timer.getElapsed()
|
||||
# Only keep a 1h loop
|
||||
now = story.hugvey.command.timer.getElapsed() % 3600
|
||||
if now < window_open_second or now > window_close_second:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue