summaryrefslogtreecommitdiffhomepage
path: root/not
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-22 18:22:33 +0200
committerAki <nthirtyone@gmail.com>2017-09-22 18:22:33 +0200
commit86c552cab9d245b6d58638179df2ae657ef9a5db (patch)
tree3aef20dfcd5038665b638a1c776a78949f65f96c /not
parent704fa62d2f75e9fca66d94bb809d14785178abed (diff)
downloadroflnauts-86c552cab9d245b6d58638179df2ae657ef9a5db.zip
roflnauts-86c552cab9d245b6d58638179df2ae657ef9a5db.tar.gz
roflnauts-86c552cab9d245b6d58638179df2ae657ef9a5db.tar.bz2
Hero now holds config for World restart
Diffstat (limited to 'not')
-rw-r--r--not/Hero.lua2
-rw-r--r--not/World.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/not/Hero.lua b/not/Hero.lua
index fc5d840..a97a2b1 100644
--- a/not/Hero.lua
+++ b/not/Hero.lua
@@ -32,8 +32,8 @@ function Hero:new (config, x, y, world)
self:setBodyFixedRotation(true)
self:newFixture()
-- General
+ self.config = config
self.world = world
- self.name = config.name
self.angle = 0
self.facing = 1
-- Status
diff --git a/not/World.lua b/not/World.lua
index 4523efa..6bc5e18 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -468,7 +468,7 @@ function World:controlpressed (set, action, key)
map.filename = filename
local nauts = {}
for _,naut in pairs(self:getNautsAll()) do
- table.insert(nauts, {naut.name, naut:getControllerSet()})
+ table.insert(nauts, {naut.config, naut:getControllerSet()})
end
local new = World(map, nauts)
sceneManager:changeScene(new)