From 207840c2cc34ff29c1417a47dd03bbe9291b5a1b Mon Sep 17 00:00:00 2001 From: Tim Anema Date: Wed, 3 Dec 2014 14:09:42 -0500 Subject: [PATCH] forgot one check --- README.md | 1 - lib/init.lua | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fa0ea1..57616c7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ :todoing --make sure all draw calls check if the object is within range -add body animations -optimize shadow body calculations and drawing methods diff --git a/lib/init.lua b/lib/init.lua index 6cb34de..9b0785a 100644 --- a/lib/init.lua +++ b/lib/init.lua @@ -182,7 +182,9 @@ function light_world:drawRefraction(l,t,w,h,s) self.refractionMap:clear() util.drawto(self.refractionMap, l, t, s, function() for i = 1, #self.body do - self.body[i]:drawRefraction() + if self.body[i]:isInRange(l,t,w,h,s) then + self.body[i]:drawRefraction() + end end end)