forgot one check

This commit is contained in:
Tim Anema 2014-12-03 14:09:42 -05:00
parent d02bc54b05
commit 207840c2cc
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,4 @@
:todoing :todoing
-make sure all draw calls check if the object is within range
-add body animations -add body animations
-optimize shadow body calculations and drawing methods -optimize shadow body calculations and drawing methods

View File

@ -182,7 +182,9 @@ function light_world:drawRefraction(l,t,w,h,s)
self.refractionMap:clear() self.refractionMap:clear()
util.drawto(self.refractionMap, l, t, s, function() util.drawto(self.refractionMap, l, t, s, function()
for i = 1, #self.body do 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
end) end)