summaryrefslogtreecommitdiffhomepage
path: root/not/Camera.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-02 21:16:30 +0200
committerAki <nthirtyone@gmail.com>2017-09-02 21:16:30 +0200
commit27a1d0de613a360912d1e9f3a5db7ab044a0b450 (patch)
treefa9b99f8786a93a7019adda0cf5182c63b7e19de /not/Camera.lua
parent2b33497121abec53d1fcbce68c9c0d8224079032 (diff)
downloadroflnauts-27a1d0de613a360912d1e9f3a5db7ab044a0b450.zip
roflnauts-27a1d0de613a360912d1e9f3a5db7ab044a0b450.tar.gz
roflnauts-27a1d0de613a360912d1e9f3a5db7ab044a0b450.tar.bz2
Center_* changed to center.* (table)
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