From f2a2578a9ca87d4e4eb5dfae04f0a8cecefad50c Mon Sep 17 00:00:00 2001 From: Nathan Lam Date: Wed, 15 Feb 2017 18:36:39 -0500 Subject: [PATCH] Fixed error in broadcast method CHANGED: - Forgot to rename 'child' variable name to 'next' when changing structure. --- scene.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scene.lua b/scene.lua index db0d25d..a9ff374 100644 --- a/scene.lua +++ b/scene.lua @@ -259,12 +259,12 @@ function node:broadcast(event_type, ...) insert_all(self.children, queue) while qpos <= #queue do local next = queue[qpos] - if not child:fire(event_type, ...) then + if not next:fire(event_type, ...) then return end - if child.children then - insert_all(child.children, queue) + if next.children then + insert_all(next.children, queue) end qpos = qpos + 1