From 576dd0affc6b85a8efa1f0cff0abef55ac0cd415 Mon Sep 17 00:00:00 2001 From: dmitry kim Date: Mon, 29 Dec 2008 04:38:00 +0300 Subject: * (timer) ignore blocked actions .next() :/ --- lib/rbot/timer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot') diff --git a/lib/rbot/timer.rb b/lib/rbot/timer.rb index f68e490a..aafa9be2 100644 --- a/lib/rbot/timer.rb +++ b/lib/rbot/timer.rb @@ -248,7 +248,7 @@ class Timer @actions.delete k unless a.next end - nxt = @actions.values.map { |v| v.next }.min + nxt = @actions.values.find_all { |v| !v.blocked? }.map{ |v| v.next }.min if nxt delta = nxt - now -- cgit v1.2.3