summaryrefslogtreecommitdiffhomepage
path: root/not/Camera.lua
diff options
context:
space:
mode:
Diffstat (limited to 'not/Camera.lua')
-rw-r--r--not/Camera.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/not/Camera.lua b/not/Camera.lua
index aa4df5b..183a323 100644
--- a/not/Camera.lua
+++ b/not/Camera.lua
@@ -108,11 +108,11 @@ end
-- Move follow
function Camera:follow ()
local map = self.world.map
- local sum_x,sum_y,i = map.center_x, map.center_y, 1
+ local sum_x,sum_y,i = map.center.x, map.center.y, 1
for k,naut in pairs(self.world.Nauts) do
local naut_x,naut_y = naut:getPosition()
- if math.abs(naut_x - map.center_x) < map.width/2 and
- math.abs(naut_y - map.center_y) < map.height/2 then
+ if math.abs(naut_x - map.center.x) < map.width/2 and
+ math.abs(naut_y - map.center.y) < map.height/2 then
i = i + 1
sum_x = naut_x + sum_x
sum_y = naut_y + sum_y