Skip to content

Tick Repeat/Delay updates #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 4, 2016
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix for issue #145.
Fixed Repeat status remaining RUNNING when its delay was cancelled on level end.
  • Loading branch information
satoon101 committed Oct 22, 2016
commit 9d2ab7148d885766f9d93c200bbf0c0192aa3895
10 changes: 9 additions & 1 deletion addons/source-python/packages/source-python/listeners/tick.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,5 +573,13 @@ def _unload_instance(self):
@OnLevelEnd
def _cancel_delays_on_level_end():
for delay in list(_delay_manager):
if delay.cancel_on_level_end:
if not delay.cancel_on_level_end:
continue
callback = delay.callback
if (
callback.__name__ == '_execute' and
isinstance(callback.__self__, Repeat)
):
callback.__self__.stop()
else:
delay.cancel()