summaryrefslogtreecommitdiff
path: root/camera.lua
diff options
context:
space:
mode:
Diffstat (limited to 'camera.lua')
-rw-r--r--camera.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/camera.lua b/camera.lua
index b2dcf4c..6062ee7 100644
--- a/camera.lua
+++ b/camera.lua
@@ -42,11 +42,9 @@ end
_cull_factor = 1/4
function Camera:render(entity)
screen_position = (entity.sprite_position or entity.position) - self.position
- if not screen_position:in_bounds(SCREEN * -_cull_factor, SCREEN * (1 + _cull_factor)) then
- return
+ if screen_position:in_bounds(SCREEN * -_cull_factor, SCREEN * (1 + _cull_factor)) then
+ entity:render(screen_position)
end
-
- entity:render(screen_position)
end
function Camera:new(tracking)